Examples of addHourCost()


Examples of org.libreplan.business.costcategories.entities.CostCategory.addHourCost()

        type1.setDefaultPrice(BigDecimal.TEN);
        typeOfWorkHoursDAO.save(type1);
        HourCost hourCost1 = HourCost.create(BigDecimal.ONE, new LocalDate(2009, 11,1));
        hourCost1.setType(type1);
        hourCost1.setEndDate(new LocalDate(2009, 11,10));
        costCategory.addHourCost(hourCost1);

        HourCost hourCost2 = HourCost.create(BigDecimal.ONE, new LocalDate(2009, 11,1));
        hourCost2.setType(type1);
        hourCost2.setEndDate(new LocalDate(2009, 11,10));
        assertFalse(costCategory.canAddHourCost(hourCost2));
View Full Code Here

Examples of org.libreplan.business.costcategories.entities.CostCategory.addHourCost()

        TypeOfWorkHours type =
            TypeOfWorkHours.create(UUID.randomUUID().toString(), UUID.randomUUID().toString());
        hourCost.setType(type);
        int previous = costCategory.getHourCosts().size();

        costCategory.addHourCost(hourCost);
        costCategoryDAO.save(costCategory);
        assertEquals(previous + 1, costCategory.getHourCosts().size());

        costCategory.removeHourCost(hourCost);
        costCategoryDAO.save(costCategory);
View Full Code Here

Examples of org.libreplan.business.costcategories.entities.CostCategory.addHourCost()

        typeOfWorkHoursDAO.save(type2);

        HourCost hourCost1 = HourCost.create(BigDecimal.ONE, new LocalDate(2009, 11,1));
        hourCost1.setType(type1);
        hourCost1.setEndDate(new LocalDate(2009, 11,10));
        costCategory.addHourCost(hourCost1);

        HourCost hourCost2 = HourCost.create(BigDecimal.ONE, new LocalDate(2009, 11,1));
        hourCost2.setType(type2);
        hourCost2.setEndDate(new LocalDate(2009, 11,10));
        costCategory.addHourCost(hourCost2);
View Full Code Here

Examples of org.libreplan.business.costcategories.entities.CostCategory.addHourCost()

        costCategory.addHourCost(hourCost1);

        HourCost hourCost2 = HourCost.create(BigDecimal.ONE, new LocalDate(2009, 11,1));
        hourCost2.setType(type2);
        hourCost2.setEndDate(new LocalDate(2009, 11,10));
        costCategory.addHourCost(hourCost2);

        //this save is correct
        costCategoryDAO.save(costCategory);

        hourCost2.setType(type1);
View Full Code Here

Examples of org.libreplan.business.costcategories.entities.CostCategory.addHourCost()

                .trim(costCategoryDTO.name), costCategoryDTO.enabled);

        for (HourCostDTO hourCostDTO : costCategoryDTO.hourCostDTOs) {
            HourCost hourCost = toEntity(hourCostDTO);
            hourCost.setCategory(costCategory);
            costCategory.addHourCost(hourCost);
        }

        return costCategory;

    }
View Full Code Here

Examples of org.libreplan.business.costcategories.entities.CostCategory.addHourCost()

        assertFalse(costCategory1.getHourCosts().contains(hourCost));
        assertTrue(costCategory2.getHourCosts().contains(hourCost));

        costCategory1.addHourCost(hourCost);
        costCategory2.addHourCost(hourCost);
        hourCostDAO.save(hourCost);

        assertFalse(costCategory1.getHourCosts().contains(hourCost));
        assertTrue(costCategory2.getHourCosts().contains(hourCost));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.