Package com.wesabe.api.accounts.analytics

Examples of com.wesabe.api.accounts.analytics.IntervalSummarizer.summarize()


   
    @Before
    public void setup() {
      final IntervalSummarizer summarizer = new IntervalSummarizer(new CurrencyExchangeRateMap());
     
      this.summaries = summarizer.summarize(ImmutableList.of(paidRent, boughtLunch), interval, IntervalType.DAILY, USD, null);
    }
   
    @Test
    public void itBuildsASingleSummary() throws Exception {
      assertThat(summaries).hasSize(1);
View Full Code Here


    @Before
    public void setup() {
      final IntervalSummarizer summarizer = new IntervalSummarizer(new CurrencyExchangeRateMap());

      this.summaries = summarizer.summarize(txactions, interval, IntervalType.DAILY, USD, null);
    }

    @Test
    public void itBuildsThreeSummaries() throws Exception {
      assertThat(summaries).hasSize(3);
View Full Code Here

    @Before
    public void setup() {
      final IntervalSummarizer summarizer = new IntervalSummarizer(new CurrencyExchangeRateMap());

      this.summaries = summarizer.summarize(txactions, interval, IntervalType.WEEKLY, USD, null);
    }

    @Test
    public void itBuildsFourteenSummaries() throws Exception {
      assertThat(summaries).hasSize(14);
View Full Code Here

      final Txaction txaction = new Txaction(account, decimal("-30.00"), date(2009, 2, 13));
      txaction.setStatus(TxactionStatus.DELETED);

      final IntervalSummarizer summarizer = new IntervalSummarizer(new CurrencyExchangeRateMap());

      this.summaries = summarizer.summarize(ImmutableList.of(txaction), interval, IntervalType.MONTHLY, USD, null);
    }

    @Test
    public void itDoesNotIncludeDeletedTxactions() throws Exception {
      final List<MonetarySummaryWithSplits> values = ImmutableList.copyOf(summaries.values());
View Full Code Here

      final Txaction txaction = new Txaction(account, decimal("-30.00"), date(2009, 2, 13));
      txaction.setStatus(TxactionStatus.DISABLED);

      final IntervalSummarizer summarizer = new IntervalSummarizer(new CurrencyExchangeRateMap());

      this.summaries = summarizer.summarize(ImmutableList.of(txaction), interval, IntervalType.MONTHLY, USD, null);
    }

    @Test
    public void itDoesNotIncludeDisabledTxactions() throws Exception {
      final List<MonetarySummaryWithSplits> values = ImmutableList.copyOf(summaries.values());
View Full Code Here

      final Txaction txaction = new Txaction(account, decimal("-30.00"), date(2009, 2, 13));
      txaction.setTransferTxaction(new Txaction());

      final IntervalSummarizer summarizer = new IntervalSummarizer(new CurrencyExchangeRateMap());

      this.summaries = summarizer.summarize(ImmutableList.of(txaction), interval, IntervalType.MONTHLY, USD, null);
    }

    @Test
    public void itDoesNotIncludeTransferTxactions() throws Exception {
      final List<MonetarySummaryWithSplits> values = ImmutableList.copyOf(summaries.values());
View Full Code Here

      final Txaction txaction1 = new Txaction(account, decimal("-30.00"), date(2009, 2, 13));
      final Txaction txaction2 = new Txaction(account, decimal("-30.00"), date(2009, 2, 14));

      final IntervalSummarizer summarizer = new IntervalSummarizer(new CurrencyExchangeRateMap());

      this.summaries = summarizer.summarize(ImmutableList.of(txaction1, txaction2), interval, IntervalType.MONTHLY, USD, null);
    }

    @Test
    public void itSummarizesAllOfTheTxactions() throws Exception {
      final List<MonetarySummaryWithSplits> values = ImmutableList.copyOf(summaries.values());
View Full Code Here

      final Account account = new Account("Checking", USD);
      final Txaction txaction = new Txaction(account, decimal("-30.00"), date(2009, 2, 13));
      txaction.addTag(new Tag("food"));

      final IntervalSummarizer summarizer = new IntervalSummarizer(new CurrencyExchangeRateMap());
      this.summaries = summarizer.summarize(ImmutableList.of(txaction), interval, IntervalType.MONTHLY, USD, null);
    }

    @Test
    public void itSummarizesAllOfTheTxactions() throws Exception {
      final List<MonetarySummaryWithSplits> values = ImmutableList.copyOf(summaries.values());
View Full Code Here

      final Txaction partiallyFiltered = new Txaction(account, decimal("-30.00"), date(2009, 2, 13));
      partiallyFiltered.addTag(loan, decimal("-20.00"));

      final IntervalSummarizer summarizer = new IntervalSummarizer(new CurrencyExchangeRateMap());

      this.summaries = summarizer.summarize(ImmutableList.of(fullyFiltered, partiallyFiltered), interval, IntervalType.MONTHLY, USD, filteredTags);
    }

    @Test
    public void itDoesNotIncludeFullyFilteredTxactions() throws Exception {
      final List<MonetarySummaryWithSplits> values = ImmutableList.copyOf(summaries.values());
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.