Skip to content

Commit

Permalink
Improve Credit Suisse AG PDF-Importer
Browse files Browse the repository at this point in the history
Format source to standard eclipse format
Improve regulare expressions
Remove obsolet source
  • Loading branch information
Nirus2000 committed Apr 4, 2024
1 parent a102f50 commit b1e5cba
Show file tree
Hide file tree
Showing 3 changed files with 314 additions and 255 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void testWertpapierKauf01()
Security security = results.stream().filter(SecurityItem.class::isInstance).findFirst()
.orElseThrow(IllegalArgumentException::new).getSecurity();
assertThat(security.getIsin(), is("US46284V1017"));
assertNull(security.getWkn());
assertThat(security.getWkn(), is("26754105"));
assertNull(security.getTickerSymbol());
assertThat(security.getName(), is("Registered Shs Iron Mountain Inc"));
assertThat(security.getCurrencyCode(), is(CurrencyUnit.USD));
Expand Down Expand Up @@ -112,7 +112,7 @@ public void testWertpapierKauf02()
Security security = results.stream().filter(SecurityItem.class::isInstance).findFirst()
.orElseThrow(IllegalArgumentException::new).getSecurity();
assertThat(security.getIsin(), is("XS1055787680"));
assertNull(security.getWkn());
assertThat(security.getWkn(), is("24160639"));
assertNull(security.getTickerSymbol());
assertThat(security.getName(), is("6.25 % Fixed Rate Notes Norddeutsche"));
assertThat(security.getCurrencyCode(), is(CurrencyUnit.USD));
Expand Down Expand Up @@ -176,7 +176,7 @@ public void testWertpapierVerkauf01()
Security security = results.stream().filter(SecurityItem.class::isInstance).findFirst()
.orElseThrow(IllegalArgumentException::new).getSecurity();
assertThat(security.getIsin(), is("GB00B03MLX29"));
assertNull(security.getWkn());
assertThat(security.getWkn(), is("1987674"));
assertNull(security.getTickerSymbol());
assertThat(security.getName(), is("Akt. -A- Royal Dutch Shell PLC"));
assertThat(security.getCurrencyCode(), is(CurrencyUnit.EUR));
Expand Down Expand Up @@ -220,7 +220,7 @@ public void testWertpapierVerkauf02()
Security security = results.stream().filter(SecurityItem.class::isInstance).findFirst()
.orElseThrow(IllegalArgumentException::new).getSecurity();
assertThat(security.getIsin(), is("US88163VAD10"));
assertNull(security.getWkn());
assertThat(security.getWkn(), is("2429251"));
assertNull(security.getTickerSymbol());
assertThat(security.getName(), is("6.15 % Notes Teva Pharmaceutical Finance"));
assertThat(security.getCurrencyCode(), is(CurrencyUnit.USD));
Expand Down Expand Up @@ -283,7 +283,7 @@ public void testDividende01()
Security security = results.stream().filter(SecurityItem.class::isInstance).findFirst()
.orElseThrow(IllegalArgumentException::new).getSecurity();
assertThat(security.getIsin(), is("XS1055787680"));
assertNull(security.getWkn());
assertThat(security.getWkn(), is("24160639"));
assertNull(security.getTickerSymbol());
assertThat(security.getName(), is("6.25 % FIXED RATE NOTES NORDDEUTSCHE"));
assertThat(security.getCurrencyCode(), is(CurrencyUnit.USD));
Expand Down Expand Up @@ -326,7 +326,7 @@ public void testDividende02()
Security security = results.stream().filter(SecurityItem.class::isInstance).findFirst()
.orElseThrow(IllegalArgumentException::new).getSecurity();
assertThat(security.getIsin(), is("US46284V1017"));
assertNull(security.getWkn());
assertThat(security.getWkn(), is("26754105"));
assertNull(security.getTickerSymbol());
assertThat(security.getName(), is("REGISTERED SHS IRON MOUNTAIN INC"));
assertThat(security.getCurrencyCode(), is(CurrencyUnit.USD));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private void addBuySellTransaction()
// @formatter:on
.section("shares") //
.find("Wir haben.*")
.match("^(?<shares>[\\.',\\d]+) .*$") //
.match("^(?<shares>[\\.'\\d]+) .*$") //
.assign((t, v) -> t.setShares(asShares(v.get("shares"))))

// @formatter:off
Expand Down
Loading

0 comments on commit b1e5cba

Please sign in to comment.