Package org.libreplan.business.workreports.entities

Examples of org.libreplan.business.workreports.entities.WorkReportType


    private IWorkReportTypeDAO workReportTypeDAO;

    @Test
    @Transactional
    public void testSaveWorkReportType() {
        WorkReportType workReportType = createValidWorkReportType();
        workReportTypeDAO.save(workReportType);
        assertTrue(workReportTypeDAO.exists(workReportType.getId()));
    }
View Full Code Here


    }

    @Test
    @Transactional
    public void testRemoveWorkReportType() throws InstanceNotFoundException {
        WorkReportType workReportType = createValidWorkReportType();
        workReportTypeDAO.save(workReportType);
        workReportTypeDAO.remove(workReportType.getId());
        assertFalse(workReportTypeDAO.exists(workReportType.getId()));
    }
View Full Code Here

    @Test
    @Transactional
    public void testListWorkReportType() {
        int previous = workReportTypeDAO.list(WorkReportType.class).size();

        WorkReportType workReportType1 = createValidWorkReportType();
        workReportTypeDAO.save(workReportType1);
        WorkReportType workReportType2 = createValidWorkReportType();
        workReportTypeDAO.save(workReportType1);
        workReportTypeDAO.save(workReportType2);

        List<WorkReportType> list = workReportTypeDAO
                .list(WorkReportType.class);
View Full Code Here

    }

    @Test
    @Transactional
    public void checkIfIndexLabelsAndFieldsAreConsecutive() {
        WorkReportType workReportType = createValidWorkReportType();

        WorkReportLabelTypeAssigment labelAssigment_1 = createValidWorkReportLabelTypeAssigment();
        workReportType.addLabelAssigmentToEndLine(labelAssigment_1);

        WorkReportLabelTypeAssigment labelAssigment_2 = createValidWorkReportLabelTypeAssigment();
        workReportType.addLabelAssigmentToEndLine(labelAssigment_2);

        WorkReportLabelTypeAssigment labelAssigment_3 = createValidWorkReportLabelTypeAssigment();
        workReportType.addLabelAssigmentToEndLine(labelAssigment_3);

        // Set not consecutives index labels
        labelAssigment_1.setPositionNumber(3);
        labelAssigment_2.setPositionNumber(0);
        labelAssigment_3.setPositionNumber(2);
View Full Code Here

    }

    @Test
    @Transactional
    public void checkIfIndexLabelsAndFieldsInitInZero() {
        WorkReportType workReportType = createValidWorkReportType();

        WorkReportLabelTypeAssigment labelAssigment_1 = createValidWorkReportLabelTypeAssigment();
        workReportType.addLabelAssigmentToEndLine(labelAssigment_1);

        WorkReportLabelTypeAssigment labelAssigment_2 = createValidWorkReportLabelTypeAssigment();
        workReportType.addLabelAssigmentToEndLine(labelAssigment_2);

        WorkReportLabelTypeAssigment labelAssigment_3 = createValidWorkReportLabelTypeAssigment();
        workReportType.addLabelAssigmentToEndLine(labelAssigment_3);

        // Set repeat indes labels
        labelAssigment_1.setPositionNumber(1);
        labelAssigment_2.setPositionNumber(2);
        labelAssigment_3.setPositionNumber(3);
View Full Code Here

    }

    @Test
    @Transactional
    public void checkIfIndexLabelsAndFieldsAreUniques() {
        WorkReportType workReportType = createValidWorkReportType();

        WorkReportLabelTypeAssigment labelAssigment_1 = createValidWorkReportLabelTypeAssigment();
        workReportType.addLabelAssigmentToEndLine(labelAssigment_1);

        WorkReportLabelTypeAssigment labelAssigment_2 = createValidWorkReportLabelTypeAssigment();
        workReportType.addLabelAssigmentToEndLine(labelAssigment_2);

        WorkReportLabelTypeAssigment labelAssigment_3 = createValidWorkReportLabelTypeAssigment();
        workReportType.addLabelAssigmentToEndLine(labelAssigment_3);

        // Set repeat indes labels
        labelAssigment_1.setPositionNumber(1);
        labelAssigment_2.setPositionNumber(0);
        labelAssigment_3.setPositionNumber(1);
View Full Code Here

    @Override
    @Transactional(readOnly = true)
    public WorkReportType asObject(String stringRepresentation) {
        try {
            WorkReportType workReportType = workReportTypeDAO
                    .findByCode(stringRepresentation);
            return workReportType;
        } catch (InstanceNotFoundException e) {
            throw new RuntimeException(e);
        }
View Full Code Here

TOP

Related Classes of org.libreplan.business.workreports.entities.WorkReportType

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.