Examples of summarize()


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

    @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

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

      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

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

      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

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

      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

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

      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

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

      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

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

      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

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

      deletedLunch.addTag(friends, decimal("-6.45"));
      deletedLunch.setStatus(TxactionStatus.DELETED);
     
      final TagSummarizer summarizer = new TagSummarizer(new CurrencyExchangeRateMap());
     
      this.summaries = summarizer.summarize(txactions, USD);
    }
   
    @Test
    public void itGeneratesASummaryForEachTag() throws Exception {
      assertThat(summaries.keySet()).containsOnly(rent, lunch, food, restaurants, friends);
View Full Code Here

Examples of org.apache.hedwig.client.benchmark.BenchmarkUtils.ThroughputAggregator.summarize()

            });
        }
        System.out.println("Finished subscribing to topics and now waiting for messages to come in...");
        // Wait till the benchmark test has completed
        agg.queue.take();
        System.out.println(agg.summarize(agg.earliest.get()));
        return null;
    }

    long getSrcSeqId(Message msg) {
        if (msg.getMsgId().getRemoteComponentsCount() == 0) {
View Full Code Here

Examples of org.apache.hedwig.client.benchmark.BenchmarkUtils.ThroughputAggregator.summarize()

            });
        }
        System.out.println("Finished subscribing to topics and now waiting for messages to come in...");
        // Wait till the benchmark test has completed
        agg.queue.take();
        System.out.println(agg.summarize(agg.earliest.get()));
        return null;
    }

    long getSrcSeqId(Message msg) {
        if (msg.getMsgId().getRemoteComponentsCount() == 0) {
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.