Package com.wesabe.api.accounts.analytics

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


      assertThat(summary.getNet().getCount()).isEqualTo(3);
    }
   
    @Test
    public void itHasAMapOfTagsToSplitSummaries() throws Exception {
      final MonetarySummary s = summary.getSplitSummaries().get(tag);
     
      assertThat(s).isNotNull();
      assertThat(s.getEarnings()).isEqualTo(splitEarnings);
      assertThat(s.getSpending()).isEqualTo(splitSpending);
      assertThat(s.getNet().getAmount()).isEqualTo(money("10.00", USD));
      assertThat(s.getNet().getCount()).isEqualTo(3);
    }
View Full Code Here


      assertThat(summaries).hasSize(1);
    }
   
    @Test
    public void itSummarizesSpendingTransactions() throws Exception {
      final MonetarySummary summary = summaries.get(interval);
     
      assertThat(summary.getSpending().getAmount()).isEqualTo(money("1500.00", USD));
      assertThat(summary.getSpending().getCount()).isEqualTo(1);
    }
View Full Code Here

      assertThat(summary.getSpending().getCount()).isEqualTo(1);
    }
   
    @Test
    public void itSummarizesEarningsTransactions() throws Exception {
      final MonetarySummary summary = summaries.get(interval);
     
      assertThat(summary.getEarnings().getAmount()).isEqualTo(money("12.34", USD));
      assertThat(summary.getEarnings().getCount()).isEqualTo(1);
    }
View Full Code Here

      assertThat(summary.getEarnings().getCount()).isEqualTo(1);
    }

    @Test
    public void itSummarizesNetTransactions() throws Exception {
      final MonetarySummary summary = summaries.get(interval);

     
      assertThat(summary.getNet().getAmount()).isEqualTo(money("-1487.66", USD));
      assertThat(summary.getNet().getCount()).isEqualTo(2);
    }
View Full Code Here

   
    @Before
    public void setup() throws Exception {
      this.food = new Tag("food");
     
      this.foodSummary = new MonetarySummary(new SumOfMoney(money("45.00", USD), 6), new SumOfMoney(Money.zero(USD), 0));
     
      this.presenter = new IntervalSummaryPresenter(new SumOfMoneyPresenter((new MoneyPresenter())));
     
      this.interval = new Interval(date(2006, 7, 1), date(2006, 8, 1));
     
View Full Code Here

    public void setup() throws Exception {
      this.presenter = new TagSummaryPresenter(new SumOfMoneyPresenter((new MoneyPresenter())));
     
      this.tag = new Tag("food");
     
      this.summary = new MonetarySummary(
        new SumOfMoney(money("3409.32", USD), 17),
        new SumOfMoney(money("2091.11", USD), 5)
      );
    }
View Full Code Here

TOP

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

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.