records.add(wdtr9);
records.add(wdtr10);
try {
WorkedTimeSummaryCalcService srv = (WorkedTimeSummaryCalcService) applicationContext.getBean(WorkedTimeSummaryCalcService.BEAN_ID);
WorkedTimeSummaryInfo res = srv.calcSummaryValues(records);
assertNotNull("Result is null.", res);
assertNotNull("Number of hours is null.", res.getNumberOfHours());
assertNotNull("Number of days is null.", res.getNumberOfDays());
assertNotNull("Incomes is null.", res.getIncomes());
assertNotNull("VAT is null.", res.getVatTax());
assertEquals(
"Wrong number of hours: ",
new BigDecimal("18.75").setScale(2, BigDecimal.ROUND_HALF_UP),
res.getNumberOfHours());
assertEquals(
"Wrong number of hours: ",
new BigDecimal("2.34").setScale(2, BigDecimal.ROUND_HALF_UP),
res.getNumberOfDays());
assertEquals(
"Wrong incomes: ",
new BigDecimal("2306.25").setScale(2, BigDecimal.ROUND_HALF_UP),
res.getIncomes());
assertEquals(
"Wrong VAT: ",
new BigDecimal("369.00").setScale(2, BigDecimal.ROUND_HALF_UP),
res.getVatTax());
} finally {
ArrayList<AbstractDomainObject> objs = new ArrayList<AbstractDomainObject>();
while (!del_objs.isEmpty()) {
objs.add(del_objs.pop());
}