Package com.wesabe.api.util.money

Examples of com.wesabe.api.util.money.CurrencyExchangeRateMap


    private Txaction paidRent = new Txaction(checking, decimal("-1500.00"), date(2009, 1, 18));
    private Txaction boughtLunch = new Txaction(checking, decimal("12.34"), new DateTime(2009, 1, 18, 23, 0, 0, 0));
   
    @Before
    public void setup() {
      final IntervalSummarizer summarizer = new IntervalSummarizer(new CurrencyExchangeRateMap());
     
      this.summaries = summarizer.summarize(ImmutableList.of(paidRent, boughtLunch), interval, IntervalType.DAILY, USD, null);
    }
View Full Code Here


    private ImmutableMap<Interval, MonetarySummaryWithSplits> summaries;
    private Collection<Txaction> txactions = ImmutableList.of();

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

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

    private ImmutableMap<Interval,MonetarySummaryWithSplits> summaries;
    private Collection<Txaction> txactions = ImmutableList.of();

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

      this.summaries = summarizer.summarize(txactions, interval, IntervalType.WEEKLY, USD, null);
    }
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.setStatus(TxactionStatus.DELETED);

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

      this.summaries = summarizer.summarize(ImmutableList.of(txaction), interval, IntervalType.MONTHLY, USD, null);
    }
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.setStatus(TxactionStatus.DISABLED);

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

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

    public void setup() {
      final Account account = new Account("Checking", USD);
      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);
    }
View Full Code Here

      verify(session).close();
    }
   
    @Test
    public void itReturnsAMapWithAllTheRates() throws Exception {
      final CurrencyExchangeRateMap map = provider.get();
     
      assertEquals(decimal("0.7656001"), map.getExchangeRate(USD, EUR, apr1st));
      assertEquals(decimal("1.306165"), map.getExchangeRate(EUR, USD, apr1st));
    }
View Full Code Here

    public void setup() {
      final Account account = new Account("Checking", USD);
      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);
    }
View Full Code Here

    public void setup() {
      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);
    }
View Full Code Here

      fullyFiltered.addTag(workExpense);

      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);
    }
View Full Code Here

TOP

Related Classes of com.wesabe.api.util.money.CurrencyExchangeRateMap

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.