Examples of WorkReportLabelTypeAssigment


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

    @Test
    @Transactional
    public void checkIfLabelWorkReportLabelTypeAssigmentIsNull() {
        WorkReportType workReportType = createValidWorkReportType();
        WorkReportLabelTypeAssigment labelAssigment = createValidWorkReportLabelTypeAssigment();
        labelAssigment.setDefaultLabel(null);
        workReportType.addLabelAssigmentToEndLine(labelAssigment);

        try {
            workReportTypeDAO.save(workReportType);
            fail("It should throw an exception");
View Full Code Here

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

    @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);

        try {
            workReportTypeDAO.save(workReportType);
            fail("It should throw an exception");
        } catch (ValidationException e) {
View Full Code Here

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

    @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);

        try {
            workReportTypeDAO.save(workReportType);
            fail("It should throw an exception");
        } catch (ValidationException e) {
View Full Code Here

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

    @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);

        try {
            workReportTypeDAO.save(workReportType);
            fail("It should throw an exception");
        } catch (ValidationException e) {
View Full Code Here

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

        labelTypeDAO.save(labelType);
        Label label = Label.create(UUID.randomUUID().toString());
        label.setType(labelType);
        labelDAO.save(label);

        WorkReportLabelTypeAssigment labelAssigment = WorkReportLabelTypeAssigment
                .create();
        labelAssigment.setDefaultLabel(label);
        labelAssigment.setLabelType(labelType);
        return labelAssigment;
    }
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.