Package com.wesabe.api.accounts.analytics

Examples of com.wesabe.api.accounts.analytics.TxactionListBuilder


      txactions = ImmutableList.of(starbucks, disabled, wholeFoods, deleted);
    }

    @Test
    public void itFiltersDeletedAndDisabledTransactions() throws Exception {
      assertEquals(Lists.newArrayList(starbucks, wholeFoods), new TxactionListBuilder()
                                    .setCurrency(USD)
                                    .setCurrencyExchangeRateMap(exchangeRates)
                                    .setAccounts(new AccountList(checking))
                                    .build(txactions)
                                    .getTxactions());
View Full Code Here


                                    .getTxactions());
    }
   
    @Test
    public void itDoesNotIncludeTheDeletedOrDisabledTransactionsInTheTotalCount() throws Exception {
      final TxactionList list = new TxactionListBuilder()
                      .setCurrency(USD)
                      .setCurrencyExchangeRateMap(exchangeRates)
                      .setAccounts(new AccountList(checking))
                      .build(txactions);
View Full Code Here

      checkingTxactions = Lists.newArrayList(starbucks, wholeFoods);
    }

    @Test
    public void itReturnsTxactionsContainedByTheGivenAccounts() {
      assertEquals(checkingTxactions, new TxactionListBuilder()
                        .setAccounts(new AccountList(checking))
                        .setCurrency(USD)
                        .setCurrencyExchangeRateMap(exchangeRates)
                        .build(txactions)
                        .getTxactions());
View Full Code Here

                        .getTxactions());
    }
   
    @Test
    public void itDoesNotIncludeOtherAccountsInTheTotalCount() throws Exception {
      final TxactionList list = new TxactionListBuilder()
                    .setAccounts(new AccountList(checking))
                    .setCurrency(USD)
                    .setCurrencyExchangeRateMap(exchangeRates)
                    .build(txactions);
      assertEquals(2, list.getTotalCount());
View Full Code Here

      foodTxactions = Lists.newArrayList(starbucks, wholeFoods);
    }

    @Test
    public void itReturnsTxactionsContainedByTheGivenAccounts() {
      assertEquals(foodTxactions, new TxactionListBuilder()
                        .setTags(ImmutableSet.of(food))
                        .setAccounts(new AccountList(checking, savings))
                        .setCurrency(USD)
                        .setCurrencyExchangeRateMap(exchangeRates)
                        .build(txactions)
View Full Code Here

                        .getTxactions());
    }
   
    @Test
    public void itDoesNotIncludeOtherTagsInTheTotalCount() throws Exception {
      final TxactionList list = new TxactionListBuilder()
                      .setTags(ImmutableSet.of(food))
                      .setAccounts(new AccountList(checking, savings))
                      .setCurrency(USD)
                      .setCurrencyExchangeRateMap(exchangeRates)
                      .build(txactions);
View Full Code Here

      assertEquals(2, list.getTotalCount());
    }
   
    @Test
    public void itDoesNotCalculateARunningTotalBalance() throws Exception {
      assertNull(new TxactionListBuilder()
                .setTags(ImmutableSet.of(food))
                .setAccounts(new AccountList(checking, savings))
                .setCurrency(USD)
                .setCurrencyExchangeRateMap(exchangeRates)
                .build(txactions)
View Full Code Here

      txactions = ImmutableList.of(starbucks, interestEarned, wholeFoods);
    }
   
    @Test
    public void itDoesNotCalculateARunningTotalBalance() throws Exception {
      assertNull(new TxactionListBuilder()
                .setCalculateBalances(false)
                .setAccounts(new AccountList(checking, savings))
                .setCurrency(USD)
                .setCurrencyExchangeRateMap(exchangeRates)
                .build(txactions)
View Full Code Here

      expectedTxactions = Lists.newArrayList(wholeFoods);
    }

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

                        .getTxactions());
    }
   
    @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);
View Full Code Here

TOP

Related Classes of com.wesabe.api.accounts.analytics.TxactionListBuilder

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.