Package org.libreplan.business.planner.entities

Examples of org.libreplan.business.planner.entities.TaskMilestone


    @Override
    @Transactional(readOnly = true)
    public void doAction(IContextWithPlannerTask<TaskElement> context,
            TaskElement task) {
        TaskMilestone milestone = TaskMilestone.create(task.getEndDate());
        milestone.setName(_("new milestone"));
        taskElementDAO.reattach(task);

        Position taskPosition = context.getMapper().findPositionFor(task);
        int insertAt = taskPosition.getInsertionPosition() + 1;
View Full Code Here


                .plusDays(days);
        return result.toDateTimeAtStartOfDay().toDate();
    }

    private TaskMilestone createValidTaskMilestone() {
        TaskMilestone result = TaskMilestone.create(new Date());
        return result;
    }
View Full Code Here

    }

    @Test
    @Transactional
    public void canSaveMilestone() {
        TaskMilestone milestone = createValidTaskMilestone();
        taskElementDAO.save(milestone);
        flushAndEvict(milestone);
        TaskElement fromDB;
        try {
            fromDB = taskElementDAO.find(milestone.getId());
        } catch (InstanceNotFoundException e) {
            throw new RuntimeException(e);
        }
        assertThat(fromDB.getId(), equalTo(milestone.getId()));
        assertThat(fromDB, instanceOf(TaskMilestone.class));
    }
View Full Code Here

    }

    @Test
    @Transactional
    public void MilestoneOrderElementIsNull() {
        TaskMilestone milestone = TaskMilestone.create(new Date());
        assertThat(milestone.getOrderElement(), nullValue());
    }
View Full Code Here

TOP

Related Classes of org.libreplan.business.planner.entities.TaskMilestone

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.