@@ -0,0 +1,1792 @@
+package name.abuchen.portfolio.model;%0A%0Aimport static org.hamcrest.Matchers.is;%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertThat;%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport java.time.LocalDate;%0Aimport java.time.LocalDateTime;%0Aimport java.util.Locale;%0A%0Aimport org.junit.AfterClass;%0Aimport org.junit.Before;%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Test;%0A%0Aimport name.abuchen.portfolio.model.AccountTransaction.Type;%0Aimport name.abuchen.portfolio.model.AttributeType.AmountConverter;%0Aimport name.abuchen.portfolio.model.AttributeType.PercentConverter;%0Aimport name.abuchen.portfolio.money.CurrencyUnit;%0Aimport name.abuchen.portfolio.money.Values;%0A%0A@SuppressWarnings(%22nls%22)%0Apublic class AccountTest %7B%0A    private Account account;%0A    private AccountTransaction transaction;%0A%0A    @Before%0A    public void setup() %7B%0A        this.account = new Account();%0A        account.setName(%22Testaccount%22);%0A        account.setCurrencyCode(CurrencyUnit.EUR);%0A        %0A        this.transaction = new AccountTransaction();%0A        transaction.setDateTime(LocalDate.now().atStartOfDay());%0A        transaction.setType(AccountTransaction.Type.DEPOSIT);%0A        transaction.setAmount(10000);%0A        transaction.setCurrencyCode(CurrencyUnit.EUR);%0A    %7D%0A%0A    @Test%0A    public void testAddTransaction() %7B%0A        assertEquals(account.getTransactions().size(), 0);%0A%0A        account.addTransaction(transaction);%0A%0A        assertEquals(account.getTransactions().size(), 1);%0A        assertTrue(account.getTransactions().contains(transaction));%0A    %7D%0A    %0A    @Test(expected = IllegalArgumentException.class)%0A    public void testAddTransactionIllegalCurrencyUnit() %7B%0A        transaction.setCurrencyCode(CurrencyUnit.USD);%0A%0A        account.addTransaction(transaction);%0A    %7D%0A%7D%0A

Add Transaction for Account.Java