Skip to content

Commit dae8a5d

Browse files
authored
Merge branch 'portfolio-performance:master' into WindowsInstaller
2 parents d9cf7b6 + e39c5e1 commit dae8a5d

File tree

92 files changed

+1993
-1563
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+1993
-1563
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -376,16 +376,13 @@ All images and icons must be [Creative Commons CC0](https://creativecommons.org/
376376
**Sources**
377377
- Use icons from [iconmonstr.com](https://iconmonstr.com) only
378378
- Register all images in [Images.java](https://github.com/portfolio-performance/portfolio/blob/master/name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/Images.java)
379-
380-
**Format Requirements**
381-
- **Format**: PNG with transparent background
382-
- **Sizes**: Create 16x16px and 32x32px versions
383-
- `image.png` (16x16px)
384-
- `[email protected]` (32x32px)
379+
- Use **SVG** format with width and height set to 16px; add a fill color if needed
380+
- Note: For historical reasons, some icons are still available in PNG format with two resolutions (@1x and @2x). New icons should use SVG format only.
385381

386382
**Color Guidelines**
387383
- **Passive state**: #393E42 (dark, cool gray)
388384
- **Active state**: #F18F01 (orange)
385+
- **Error state**: #D11D1D (dark red)
389386

390387
See [Color Code Reference](#color-code-reference) for exact colors.
391388

name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/ExtractorUtilsDateParserTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ public void testAsDateValidFormatsWithHints()
156156
assertEquals(expected, ExtractorUtils.asDate("11 APR 2023", Locale.UK));
157157
assertEquals(expected, ExtractorUtils.asDate("11 April 2023", Locale.UK));
158158
assertEquals(expected, ExtractorUtils.asDate("11 APRIL 2023", Locale.UK));
159+
assertEquals(expected, ExtractorUtils.asDate("11-Apr-2023", Locale.UK));
159160

160161
expected = LocalDateTime.of(2023, 4, 1, 0, 0);
161162
assertEquals(expected, ExtractorUtils.asDate("4/1/2023", Locale.UK));
@@ -166,6 +167,8 @@ public void testAsDateValidFormatsWithHints()
166167
assertEquals(expected, ExtractorUtils.asDate("01 Apr 2023", Locale.UK));
167168
assertEquals(expected, ExtractorUtils.asDate("1 APR 2023", Locale.UK));
168169
assertEquals(expected, ExtractorUtils.asDate("01 APR 2023", Locale.UK));
170+
assertEquals(expected, ExtractorUtils.asDate("1-Apr-2023", Locale.UK));
171+
assertEquals(expected, ExtractorUtils.asDate("01-Apr-2023", Locale.UK));
169172
}
170173

171174
@Test(expected = DateTimeParseException.class)

name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/actions/DetectDuplicatesActionTest.java

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class DetectDuplicatesActionTest
3333
@Test
3434
public void testDuplicateDetection4AccountTransaction() throws IntrospectionException, ReflectiveOperationException
3535
{
36-
DetectDuplicatesAction action = new DetectDuplicatesAction(new Client());
36+
var action = new DetectDuplicatesAction(new Client());
3737

3838
new PropertyChecker<AccountTransaction>(
3939
AccountTransaction.class, "note", "source", "forex", "monetaryAmount", "updatedAt")
@@ -49,7 +49,7 @@ public void testDuplicateDetection4AccountTransaction() throws IntrospectionExce
4949
public void testDuplicateDetection4PortfolioTransaction()
5050
throws IntrospectionException, ReflectiveOperationException
5151
{
52-
DetectDuplicatesAction action = new DetectDuplicatesAction(new Client());
52+
var action = new DetectDuplicatesAction(new Client());
5353

5454
new PropertyChecker<PortfolioTransaction>(PortfolioTransaction.class, "fees", "taxes", "note", "source",
5555
"forex", "monetaryAmount", "updatedAt") //
@@ -65,7 +65,7 @@ public void testDuplicateDetection4PortfolioTransaction()
6565
public void testDuplicateDetectionWithPurchaseAndDeliveryPairs()
6666
throws IntrospectionException, ReflectiveOperationException
6767
{
68-
DetectDuplicatesAction action = new DetectDuplicatesAction(new Client());
68+
var action = new DetectDuplicatesAction(new Client());
6969

7070
new PropertyChecker<PortfolioTransaction>(PortfolioTransaction.class, "type", "fees", "taxes", "note", "source",
7171
"forex", "monetaryAmount", "updatedAt") //
@@ -93,6 +93,53 @@ public void testDuplicateDetectionWithPurchaseAndDeliveryPairs()
9393

9494
}
9595

96+
@Test
97+
public void testDuplicateDetectionWithTransferInAndDeposit()
98+
{
99+
var transferIn = getTestEntry(AccountTransaction.Type.TRANSFER_IN);
100+
var deposit = getTestEntry(AccountTransaction.Type.DEPOSIT);
101+
102+
var action = new DetectDuplicatesAction(new Client());
103+
104+
var status = action.process(deposit, account(transferIn));
105+
106+
assertThat(status.getCode(), is(Code.WARNING));
107+
108+
// check vice versa
109+
status = action.process(transferIn, account(deposit));
110+
111+
assertThat(status.getCode(), is(Code.WARNING));
112+
}
113+
114+
@Test
115+
public void testDuplicateDetectionWithTransferOutAndWithdrawal()
116+
{
117+
var transferOut = getTestEntry(AccountTransaction.Type.TRANSFER_OUT);
118+
var withdrawl = getTestEntry(AccountTransaction.Type.REMOVAL);
119+
120+
var action = new DetectDuplicatesAction(new Client());
121+
122+
var status = action.process(withdrawl, account(transferOut));
123+
124+
assertThat(status.getCode(), is(Code.WARNING));
125+
126+
// check vice versa
127+
status = action.process(transferOut, account(withdrawl));
128+
129+
assertThat(status.getCode(), is(Code.WARNING));
130+
}
131+
132+
private AccountTransaction getTestEntry(AccountTransaction.Type type)
133+
{
134+
var transaction = new AccountTransaction();
135+
transaction.setType(type);
136+
transaction.setAmount(1000);
137+
transaction.setCurrencyCode("EUR"); //$NON-NLS-1$
138+
transaction.setDateTime(LocalDateTime.of(2025, 12, 15, 0, 0));
139+
140+
return transaction;
141+
}
142+
96143
private Account account(AccountTransaction t)
97144
{
98145
Account a = new Account();

name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/pdf/bison/BisonPDFExtractorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ public void testInfoReport03()
267267
hasFeed(CoinGeckoQuoteFeed.ID), //
268268
hasFeedProperty(CoinGeckoQuoteFeed.COINGECKO_COIN_ID, "bitcoin"))));
269269

270-
// check removal transaction
270+
// check withdrawal transaction
271271
assertThat(results, hasItem(removal( //
272272
hasDate("2020-11-22T09:51"), //
273273
hasSource("InfoReport03.txt"), //

0 commit comments

Comments
 (0)