Skip to content
Snippets Groups Projects
Commit 3d08eb25 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

fixed unit tests

parent 0ad1de9c
Branches
Tags
No related merge requests found
...@@ -285,11 +285,30 @@ class DatabaseParser_v7_convertToInternalTest ...@@ -285,11 +285,30 @@ class DatabaseParser_v7_convertToInternalTest
transferTransaction.setTags(new ArrayList<>()); transferTransaction.setTags(new ArrayList<>());
transferTransaction.setIsExpenditure(true); transferTransaction.setIsExpenditure(true);
assertThat(database.getTransactions()).hasSize(4) Transaction repeatingTransferTransaction = new Transaction();
repeatingTransferTransaction.setAmount(-6000);
DateTime transferTransactionDate_2 = DateTime.parse("2018-03-15", DateTimeFormat.forPattern("yyyy-MM-dd"));
transferTransactionDate_2 = transferTransactionDate_2.withHourOfDay(12).withMinuteOfHour(0).withSecondOfMinute(0);
repeatingTransferTransaction.setDate(transferTransactionDate_2);
repeatingTransferTransaction.setCategory(categoryNone);
repeatingTransferTransaction.setName("repeat my transfer");
repeatingTransferTransaction.setDescription("");
repeatingTransferTransaction.setAccount(account1);
RepeatingOption repeatingOption_2 = new RepeatingOption();
repeatingOption_2.setModifier(new RepeatingModifierDays(10));
repeatingOption_2.setStartDate(transferTransactionDate_2);
repeatingOption_2.setEndOption(new RepeatingEndAfterXTimes(2));
repeatingTransferTransaction.setRepeatingOption(repeatingOption_2);
repeatingTransferTransaction.setTags(new ArrayList<>());
repeatingTransferTransaction.setIsExpenditure(true);
repeatingTransferTransaction.setTransferAccount(account1);
assertThat(database.getTransactions()).hasSize(5)
.contains(normalTransaction_1, .contains(normalTransaction_1,
normalTransaction_2, normalTransaction_2,
repeatingTransaction_1, repeatingTransaction_1,
transferTransaction); transferTransaction,
repeatingTransferTransaction);
} }
catch(IOException | URISyntaxException e) catch(IOException | URISyntaxException e)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment