Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class ReadingHistoricClientFilesTest
public static Collection<Object[]> getFiles()
{
return Arrays.asList(new Object[][] { // NOSONAR
{ "client52", 52 }, { "client53", 53 } });
{ "client52", 52 }, { "client53", 53 }, { "client69", 69 } });
}


Expand Down Expand Up @@ -55,10 +55,15 @@ public void compare() throws IOException
String binaryEncrypted = ClientTestUtilities.toString(binaryEncryptedClient);
assertThat(binaryEncryptedClient.getFileVersionAfterRead(), is(versionOnDisk));

Client xmlEncrpytedClient = ClientFactory.load(find(file + ".xml+pwd.portfolio"), "123456".toCharArray(),
new NullProgressMonitor());
String xmlEncrpyted = ClientTestUtilities.toString(xmlEncrpytedClient);
assertThat(xmlEncrpytedClient.getFileVersionAfterRead(), is(versionOnDisk));
String xmlEncrpyted = null;
if (versionOnDisk < 60)
{

Client xmlEncrpytedClient = ClientFactory.load(find(file + ".xml+pwd.portfolio"), "123456".toCharArray(),
new NullProgressMonitor());
xmlEncrpyted = ClientTestUtilities.toString(xmlEncrpytedClient);
assertThat(xmlEncrpytedClient.getFileVersionAfterRead(), is(versionOnDisk));
}

if (!xml.equals(binary))
{
Expand All @@ -76,7 +81,7 @@ public void compare() throws IOException
is(xml.substring(pos, Math.min(pos + 100, xml.length()))));
}

if (!xml.equals(xmlEncrpyted))
if (xmlEncrpyted != null && !xml.equals(xmlEncrpyted))
{
int pos = ClientTestUtilities.indexOfDifference(xml, xmlEncrpyted);
assertThat("encrypted xml is not identical to xml " + pos,
Expand All @@ -85,4 +90,4 @@ public void compare() throws IOException
}

}
}
}
Binary file not shown.
Binary file not shown.
258 changes: 258 additions & 0 deletions name.abuchen.portfolio.tests/src/fileversions/client69.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,258 @@
<client>
<version>69</version>
<baseCurrency>EUR</baseCurrency>
<securities>
<security>
<uuid>2bab2728-f3b2-4ca0-8330-825446831ade</uuid>
<name>Commerzbank AG Inhaber-Aktien o.N.</name>
<currencyCode>EUR</currencyCode>
<isin>DE000CBK1001</isin>
<tickerSymbol>CBK.DE</tickerSymbol>
<feed>PP</feed>
<prices/>
<attributes>
<map/>
</attributes>
<events/>
<isRetired>false</isRetired>
<updatedAt>2026-02-04T21:30:37.744832272Z</updatedAt>
</security>
</securities>
<watchlists/>
<accounts>
<account>
<uuid>6908edd0-1bb5-411e-bb4d-678a858eff66</uuid>
<name>dividendExdate</name>
<currencyCode>EUR</currencyCode>
<isRetired>false</isRetired>
<transactions>
<account-transaction>
<uuid>11d2ebf5-a0c5-4de1-b2f6-19a0a701e1f6</uuid>
<date>2019-05-27T00:00</date>
<currencyCode>EUR</currencyCode>
<amount>1007</amount>
<security reference="../../../../../securities/security"/>
<shares>7000000000</shares>
<note>Abrechnungs-Nr. 19200128</note>
<source>2019-05-24_Wertpapierertrag 24.05.2019_DE000CBK1001.pdf</source>
<units>
<unit type="TAX">
<amount currency="EUR" amount="393"/>
</unit>
</units>
<updatedAt>2026-02-10T13:50:10.694859420Z</updatedAt>
<type>DIVIDENDS</type>
<dateEx>2019-05-23</dateEx>
</account-transaction>
</transactions>
<attributes>
<map/>
</attributes>
<updatedAt>2026-02-04T22:52:02.886672581Z</updatedAt>
</account>
</accounts>
<portfolios>
<portfolio>
<uuid>404c0fbf-68ab-4925-bdcb-9838e2380317</uuid>
<name>dividendExdate</name>
<isRetired>false</isRetired>
<referenceAccount reference="../../../accounts/account"/>
<transactions/>
<attributes>
<map/>
</attributes>
<updatedAt>2026-02-04T22:51:41.462743232Z</updatedAt>
</portfolio>
</portfolios>
<plans/>
<taxonomies/>
<dashboards/>
<properties/>
<settings>
<bookmarks>
<bookmark>
<label>finance.yahoo.com</label>
<pattern>https://finance.yahoo.com/quote/{tickerSymbol}</pattern>
</bookmark>
<bookmark>
<label>onvista.de</label>
<pattern>https://www.onvista.de/suche.html?SEARCH_VALUE={isin}</pattern>
</bookmark>
<bookmark>
<label>finanzen.net</label>
<pattern>https://www.finanzen.net/suchergebnis.asp?frmAktiensucheTextfeld={isin}</pattern>
</bookmark>
<bookmark>
<label>ariva.de</label>
<pattern>https://www.ariva.de/{isin}</pattern>
</bookmark>
<bookmark>
<label>justetf.com (ETF)</label>
<pattern>https://www.justetf.com/etf-profile.html?isin={isin}</pattern>
</bookmark>
<bookmark>
<label>fondsweb.com</label>
<pattern>https://www.fondsweb.com/{isin}</pattern>
</bookmark>
<bookmark>
<label>morningstar.de</label>
<pattern>https://www.morningstar.de/de/funds/SecuritySearchResults.aspx?type=ALL&amp;search={isin}</pattern>
</bookmark>
<bookmark>
<label>extraETF.com (ETF)</label>
<pattern>https://extraetf.com/etf-profile/{isin}</pattern>
</bookmark>
<bookmark>
<label>alleaktien.de (Aktie)</label>
<pattern>https://www.alleaktien.de/data/{isin}</pattern>
</bookmark>
<bookmark>
<label>comdirect.de (Aktie)</label>
<pattern>https://www.comdirect.de/inf/aktien/{isin}</pattern>
</bookmark>
<bookmark>
<label>comdirect.de (ETF)</label>
<pattern>https://www.comdirect.de/inf/etfs/{isin}</pattern>
</bookmark>
<bookmark>
<label>divvydiary.com</label>
<pattern>https://divvydiary.com/symbols/{isin}</pattern>
</bookmark>
<bookmark>
<label>trackingdifferences.com (ETF)</label>
<pattern>https://www.trackingdifferences.com/ETF/ISIN/{isin}</pattern>
</bookmark>
<bookmark>
<label>tradingview.com</label>
<pattern>https://www.tradingview.com/chart/?symbol=XETR:{tickerSymbolPrefix}</pattern>
</bookmark>
<bookmark>
<label>cnbc.com (Aktie)</label>
<pattern>https://www.cnbc.com/quotes/{tickerSymbolPrefix}</pattern>
</bookmark>
<bookmark>
<label>nasdaq.com (Aktie)</label>
<pattern>https://www.nasdaq.com/market-activity/stocks/{tickerSymbolPrefix}</pattern>
</bookmark>
<bookmark>
<label>aktienfinder.net (Aktie)</label>
<pattern>https://aktienfinder.net/aktien-profil/{isin}</pattern>
</bookmark>
<bookmark>
<label>aktien.guide (Aktie)</label>
<pattern>http://aktien.guide/isin/aktien/{isin}</pattern>
</bookmark>
</bookmarks>
<attributeTypes>
<attribute-type>
<id>logo</id>
<name>Logo</name>
<columnLabel>Logo</columnLabel>
<target>name.abuchen.portfolio.model.Security</target>
<type>java.lang.String</type>
<converterClass>name.abuchen.portfolio.model.AttributeType$ImageConverter</converterClass>
<properties/>
</attribute-type>
<attribute-type>
<id>logo</id>
<name>Logo</name>
<columnLabel>Logo</columnLabel>
<target>name.abuchen.portfolio.model.Account</target>
<type>java.lang.String</type>
<converterClass>name.abuchen.portfolio.model.AttributeType$ImageConverter</converterClass>
<properties/>
</attribute-type>
<attribute-type>
<id>logo</id>
<name>Logo</name>
<columnLabel>Logo</columnLabel>
<target>name.abuchen.portfolio.model.Portfolio</target>
<type>java.lang.String</type>
<converterClass>name.abuchen.portfolio.model.AttributeType$ImageConverter</converterClass>
<properties/>
</attribute-type>
<attribute-type>
<id>logo</id>
<name>Logo</name>
<columnLabel>Logo</columnLabel>
<target>name.abuchen.portfolio.model.InvestmentPlan</target>
<type>java.lang.String</type>
<converterClass>name.abuchen.portfolio.model.AttributeType$ImageConverter</converterClass>
<properties/>
</attribute-type>
<attribute-type>
<id>ter</id>
<name>Gesamtkostenquote (TER)</name>
<columnLabel>TER</columnLabel>
<source>ter</source>
<target>name.abuchen.portfolio.model.Security</target>
<type>java.lang.Double</type>
<converterClass>name.abuchen.portfolio.model.AttributeType$PercentConverter</converterClass>
<properties/>
</attribute-type>
<attribute-type>
<id>aum</id>
<name>Fondsgröße</name>
<columnLabel>Fondsgröße</columnLabel>
<target>name.abuchen.portfolio.model.Security</target>
<type>java.lang.Long</type>
<converterClass>name.abuchen.portfolio.model.AttributeType$AmountPlainConverter</converterClass>
<properties/>
</attribute-type>
<attribute-type>
<id>vendor</id>
<name>Anbieter</name>
<columnLabel>Anbieter</columnLabel>
<source>vendor</source>
<target>name.abuchen.portfolio.model.Security</target>
<type>java.lang.String</type>
<converterClass>name.abuchen.portfolio.model.AttributeType$StringConverter</converterClass>
<properties/>
</attribute-type>
<attribute-type>
<id>acquisitionFee</id>
<name>Kaufgebühr (prozentual)</name>
<columnLabel>Kaufgebühr</columnLabel>
<target>name.abuchen.portfolio.model.Security</target>
<type>java.lang.Double</type>
<converterClass>name.abuchen.portfolio.model.AttributeType$PercentConverter</converterClass>
<properties/>
</attribute-type>
<attribute-type>
<id>managementFee</id>
<name>Verwaltungsgebühr (prozentual)</name>
<columnLabel>Verwaltungsgebühr</columnLabel>
<target>name.abuchen.portfolio.model.Security</target>
<type>java.lang.Double</type>
<converterClass>name.abuchen.portfolio.model.AttributeType$PercentConverter</converterClass>
<properties/>
</attribute-type>
</attributeTypes>
<configurationSets>
<entry>
<string>name.abuchen.portfolio.ui.views.SecuritiesTable</string>
<config-set>
<configurations>
<config>
<uuid>40227a75-8308-4477-896c-3fa920f43367</uuid>
<name>Standard</name>
<data>{&quot;items&quot;:[{&quot;id&quot;:&quot;0&quot;,&quot;sortDirection&quot;:128,&quot;width&quot;:400},{&quot;id&quot;:&quot;note&quot;,&quot;width&quot;:200},{&quot;id&quot;:&quot;1&quot;,&quot;width&quot;:100},{&quot;id&quot;:&quot;2&quot;,&quot;width&quot;:80},{&quot;id&quot;:&quot;7&quot;,&quot;width&quot;:80},{&quot;id&quot;:&quot;4&quot;,&quot;width&quot;:60},{&quot;id&quot;:&quot;5&quot;,&quot;width&quot;:80},{&quot;id&quot;:&quot;changeonpreviousamount&quot;,&quot;width&quot;:80},{&quot;id&quot;:&quot;9&quot;,&quot;width&quot;:80},{&quot;id&quot;:&quot;10&quot;,&quot;width&quot;:80},{&quot;id&quot;:&quot;q-date-first-historic&quot;,&quot;width&quot;:261}]}</data>
</config>
</configurations>
</config-set>
</entry>
<entry>
<string>name.abuchen.portfolio.ui.views.StatementOfAssetsViewer</string>
<config-set>
<configurations>
<config>
<uuid>71873ede-52b7-44fd-9877-1155f6c3e6aa</uuid>
<name>Standard</name>
<data>{&quot;items&quot;:[{&quot;id&quot;:&quot;0&quot;,&quot;width&quot;:80},{&quot;id&quot;:&quot;1&quot;,&quot;width&quot;:300},{&quot;id&quot;:&quot;2&quot;,&quot;width&quot;:80},{&quot;id&quot;:&quot;4&quot;,&quot;width&quot;:60},{&quot;id&quot;:&quot;5&quot;,&quot;width&quot;:80},{&quot;id&quot;:&quot;6&quot;,&quot;width&quot;:80},{&quot;id&quot;:&quot;note&quot;,&quot;width&quot;:821}]}</data>
</config>
</configurations>
</config-set>
</entry>
</configurationSets>
</settings>
</client>
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,15 @@ public static Matcher<Transaction> hasDate(String dateString)
Transaction::getDateTime);
}

public static Matcher<Transaction> hasDateEx(String dateString)
{
var expected = LocalDate.parse(dateString);

return new PropertyMatcher<>("exDate", //$NON-NLS-1$
expected, //
t -> ((AccountTransaction) t).getDateEx());
}

public static Matcher<Transaction> hasShares(double value)
{
// work with BigDecimal to have better assertion failed messages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void testDuplicateDetection4AccountTransaction() throws IntrospectionExce
var action = new DetectDuplicatesAction(new Client());

new PropertyChecker<AccountTransaction>(
AccountTransaction.class, "note", "source", "forex", "monetaryAmount", "updatedAt")
AccountTransaction.class, "note", "source", "forex", "monetaryAmount", "dateEx", "updatedAt")
.before((name, o, c) -> assertThat(name,
action.process(o, account(c)).getCode(), is(Code.WARNING)))
.after((name, o, c) -> assertThat(name, action.process(o, account(c)).getCode(),
Expand Down
Loading