Package com.peusoft.ptcollect.core.service.report.summary

Examples of com.peusoft.ptcollect.core.service.report.summary.WorkedTimeSummaryInfo


        records.add(wdtr8);
        records.add(wdtr9);
        records.add(wdtr10);

        try {
            WorkedTimeSummaryInfo res = wtSrv.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());
            }
View Full Code Here


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

TOP

Related Classes of com.peusoft.ptcollect.core.service.report.summary.WorkedTimeSummaryInfo

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.