Ejemplo n.º 1
0
 @Test
 public void testTotalingProjectIncomesForPeriod() throws Exception {
   Assert.assertEquals(7, document.getBudgetProjectIncomes().size());
   Assert.assertEquals(4, document.getProjectIncomePeriodTotalsForEachBudgetPeriod().size());
   Assert.assertEquals(_1K, extractPeriodTotal(document.getBudgetPeriod(0)), 0.01);
   Assert.assertEquals(_2K, extractPeriodTotal(document.getBudgetPeriod(1)), 0.01);
   Assert.assertEquals(_3K + _500, extractPeriodTotal(document.getBudgetPeriod(2)), 0.01);
   Assert.assertEquals(_4K + _500 + _1K, extractPeriodTotal(document.getBudgetPeriod(3)), 0.01);
 }
Ejemplo n.º 2
0
 @Before
 public void setUp() throws Exception {
   initializeDocument();
   document.add(createBudgetProjectIncome(document.getBudgetPeriod(0), _1K));
   document.add(createBudgetProjectIncome(document.getBudgetPeriod(1), _2K));
   document.add(createBudgetProjectIncome(document.getBudgetPeriod(2), _3K));
   document.add(createBudgetProjectIncome(document.getBudgetPeriod(2), _500));
   document.add(createBudgetProjectIncome(document.getBudgetPeriod(3), _4K));
   document.add(createBudgetProjectIncome(document.getBudgetPeriod(3), _500));
   document.add(createBudgetProjectIncome(document.getBudgetPeriod(3), _1K));
 }