Examples of AccountList


Examples of com.wesabe.api.accounts.entities.AccountList

    public void itIgnoresArchivedAndDeletedAccounts() throws Exception {
      my401k.setStatus(AccountStatus.ARCHIVED);
     
      assertEquals(
        money("4560.56", USD),
        new AccountList(accounts).getTotal(USD, exchangeRates)
      );
    }
View Full Code Here

Examples of com.wesabe.api.accounts.entities.AccountList

    }
   
    @Test
    public void itDoesNotIncludeOtherMerchantsInTheTotalCount() throws Exception {
      final TxactionList list = new TxactionListBuilder()
                      .setAccounts(new AccountList(checking, savings))
                      .setMerchantNames(ImmutableSet.of("Whole Foods"))
                      .setCurrency(USD)
                      .setCurrencyExchangeRateMap(exchangeRates)
                      .build(txactions);
      assertEquals(1, list.getTotalCount());
View Full Code Here

Examples of com.wesabe.api.accounts.entities.AccountList

   
    @Test
    public void itDoesNotCalculateARunningTotalBalance() throws Exception {
      assertNull(new TxactionListBuilder()
                .setMerchantNames(ImmutableSet.of("Whole Foods"))
                .setAccounts(new AccountList(checking, savings))
                .setCurrency(USD)
                .setCurrencyExchangeRateMap(exchangeRates)
                .build(txactions)
                .get(0).getBalance());
    }
View Full Code Here

Examples of com.wesabe.api.accounts.entities.AccountList

   
    @Test
    public void itSplitsAccountsIntoGroupsByType() {
      assertEquals(
          Lists.newArrayList(
              new AccountGroup("Checking", "checking", new AccountList(checking)),
              new AccountGroup("Savings", "savings", new AccountList(savings))),
          new AccountList(checking, savings).getAccountGroups());
    }
View Full Code Here

Examples of com.wesabe.api.accounts.entities.AccountList

    }

    @Test
    public void itIncludesAllTxactionsIfUneditedIsFalse() {
      final TxactionList list = new TxactionListBuilder()
                      .setAccounts(new AccountList(checking, savings))
                      .setUnedited(false)
                      .setCurrency(USD)
                      .setCurrencyExchangeRateMap(exchangeRates)
                      .build(txactions);
      assertEquals(5, list.getTotalCount());
View Full Code Here

Examples of com.wesabe.api.accounts.entities.AccountList

   
    @Test
    public void itConsidersCashAndManualAccountsToBelongToTheSameGroup() {
      assertEquals(
          Lists.newArrayList(
              new AccountGroup("Cash", "cash", new AccountList(cash, manual))),
          new AccountList(cash, manual).getAccountGroups());
    }
View Full Code Here

Examples of com.wesabe.api.accounts.entities.AccountList

    @Test
    public void itIncludesNonTransferTxactionsWithNoMerchantOrNoTagsIfUneditedIsTrue() {
      expectedTxactions = Lists.newArrayList(transferFromChecking, interestEarned, untaggedStarbucks);
      final TxactionList list = new TxactionListBuilder()
                      .setAccounts(new AccountList(checking, savings))
                      .setUnedited(true)
                      .setCurrency(USD)
                      .setCurrencyExchangeRateMap(exchangeRates)
                      .build(txactions);
      assertEquals(expectedTxactions, list.getTxactions());
View Full Code Here

Examples of com.wesabe.api.accounts.entities.AccountList

   
    @Test
    public void itGroupsArchivedAccountsTogether() throws Exception {
      assertEquals(
          Lists.newArrayList(
              new AccountGroup("Checking", "checking", new AccountList(checking)),
              new AccountGroup("Savings", "savings", new AccountList(savings)),
              new AccountGroup("Archived", "archived", new AccountList(oldChecking))
          ),
          new AccountList(checking, savings, oldChecking).getAccountGroups()
      );
    }
View Full Code Here

Examples of com.wesabe.api.accounts.entities.AccountList

    @Test
    public void itReturnsTxactionsExcludingTheOffsetOnes() {
      assertEquals(Lists.newArrayList(starbucks, wholeFoods), new TxactionListBuilder()
                        .setOffset(1)
                        .setAccounts(new AccountList(checking, savings))
                        .setCurrency(USD)
                        .setCurrencyExchangeRateMap(exchangeRates)
                        .build(txactions)
                        .getTxactions());
    }
View Full Code Here

Examples of com.wesabe.api.accounts.entities.AccountList

   
    @Test
    public void itIncludesTheOffsetTransactionsInTheTotalCount() throws Exception {
      final TxactionList list = new TxactionListBuilder()
                    .setOffset(1)
                    .setAccounts(new AccountList(checking, savings))
                    .setCurrency(USD)
                    .setCurrencyExchangeRateMap(exchangeRates)
                    .build(txactions);
      assertEquals(3, list.getTotalCount());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.