Package org.libreplan.business.planner.entities

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


    @Transactional
    public void testStoreSubcontractedTaskData()
            throws InstanceNotFoundException {
        Task task = createValidTask();

        SubcontractedTaskData subcontractedTaskData = SubcontractedTaskData
                .create(task);
        subcontractedTaskData.addRequiredDeliveringDates(SubcontractorDeliverDate
                .create(new Date(),new Date(), null));
        subcontractedTaskData.setExternalCompany(getSubcontractorExternalCompanySaved());

        task.setSubcontractedTaskData(subcontractedTaskData);
        taskElementDAO.save(task);
        taskElementDAO.flush();
        sessionFactory.getCurrentSession().evict(task);
        sessionFactory.getCurrentSession().evict(subcontractedTaskData);

        Task taskFound = (Task) taskElementDAO.find(task.getId());
        assertNotNull(taskFound.getSubcontractedTaskData());

        SubcontractedTaskData subcontractedTaskDataFound = subcontractedTaskDataDAO
                .find(subcontractedTaskData.getId());
        assertNotNull(subcontractedTaskDataFound.getTask());
    }
View Full Code Here

TOP

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

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.