Package com.wesabe.api.accounts.entities

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


    }

    @Test
    public void itReturnsTxactionsForTheGivenMerchants() {
      assertEquals(expectedTxactions, new TxactionListBuilder()
                        .setAccounts(new AccountList(checking, savings))
                        .setMerchantNames(ImmutableSet.of("Whole Foods"))
                        .setCurrency(USD)
                        .setCurrencyExchangeRateMap(exchangeRates)
                        .build(txactions)
                        .getTxactions());
View Full Code Here


   
    @Test
    public void itSumsAccountBalancesIntoASingleTotal() throws Exception {
      assertEquals(
        money("15488.41", USD),
        new AccountList(accounts).getTotal(USD, exchangeRates)
      );
    }
View Full Code Here

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

    }
   
    @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

   
    @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

   
    @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

    }

    @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

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

    @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

   
    @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

TOP

Related Classes of com.wesabe.api.accounts.entities.AccountList

Copyright © 2018 www.massapicom. 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.