Package org.libreplan.ws.workreports.api

Examples of org.libreplan.ws.workreports.api.WorkReportDTO


        return workReportLineDTO;
    }

    private WorkReportDTO createWorkReportDTO(String type) {
        WorkReportDTO workReportDTO = new WorkReportDTO();
        workReportDTO.code = "work-report-code-" + UUID.randomUUID();
        workReportDTO.workReportType = type;
        workReportDTO.workReportLines.add(createWorkReportLineDTO());
        return workReportDTO;
    }
View Full Code Here


    @Test
    @Transactional
    public void importInvalidLabelsToWorkReport() {
        // create work report with a work report line
        WorkReportDTO workReportDTO = createWorkReportDTO(workReportTypeCode5);

        // create invalid description value to add into head and lines.
        LabelReferenceDTO labelDTO1 = new LabelReferenceDTO("codeLabelNoexiste");
        LabelReferenceDTO labelDTO2 = new LabelReferenceDTO(labelA1);
View Full Code Here

    @Test
    @Transactional
    public void importValidLabelsToWorkReport() {
        // create work report with a work report line
        WorkReportDTO workReportDTO = createWorkReportDTO(workReportTypeCode5);

        // create invalid description value to add into head and lines.
        LabelReferenceDTO labelDTO1 = new LabelReferenceDTO(labelA1);
        LabelReferenceDTO labelDTO2 = new LabelReferenceDTO(labelB1);
View Full Code Here

    @Test
    @Transactional
    public void importInvalidDescriptionValuesToWorkReport() {
        // create work report with a work report line
        WorkReportDTO workReportDTO = createWorkReportDTO(workReportTypeCode4);

        // create invalid description value to add into head and lines.
        DescriptionValueDTO valueDTO1 = new DescriptionValueDTO(field1 + "X",
                "incorrecto");
        DescriptionValueDTO valueDTO2 = new DescriptionValueDTO(field2 + "X",
View Full Code Here

    @Test
    @Transactional
    public void importValidDescriptionValuesToWorkReport() {
        // create work report with a work report line
        WorkReportDTO workReportDTO = createWorkReportDTO(workReportTypeCode4);

        // create invalid description value to add into head and lines.
        DescriptionValueDTO valueDTO1 = new DescriptionValueDTO(field1,
                "correcto");
        DescriptionValueDTO valueDTO2 = new DescriptionValueDTO(field2,
View Full Code Here

    @Test
    @Transactional
    public void importValidWorkReportWithDateAtWorkReportLevel() {
        int previous = workReportDAO.getAll().size();

        WorkReportDTO workReportDTO = createWorkReportDTO(workReportTypeCode2);
        Date date = new LocalDate().toDateTimeAtStartOfDay().toDate();
        workReportDTO.date = DateConverter.toXMLGregorianCalendar(date);

        WorkReportListDTO workReportListDTO = new WorkReportListDTO(Arrays
                .asList(workReportDTO));
View Full Code Here

                    public Integer execute() {
                        return workReportDAO.getAll().size();
                    }
                });

        WorkReportDTO workReportDTO = createWorkReportDTO(workReportTypeCode3);
        WorkReportLineDTO workReportLineDTO = workReportDTO.workReportLines
                .iterator().next();

        int hours = 12;
        LocalTime start = new LocalTime(8, 0);
View Full Code Here

                    public Integer execute() {
                        return workReportDAO.getAll().size();
                    }
                });

        WorkReportDTO workReportDTO = createWorkReportDTO(workReportTypeCode);
        WorkReportListDTO workReportListDTO = new WorkReportListDTO(Arrays
                .asList(workReportDTO));

        InstanceConstraintViolationsListDTO instanceConstraintViolationsListDTO = workReportService
                .addWorkReports(workReportListDTO);
View Full Code Here

        }
        if (workReportLineDTOs.isEmpty()) {
            workReportLineDTOs = null;
        }

        return new WorkReportDTO(code, workReportTypeCode, date, resourceCode,
                orderElementCode, labelDTOs, descriptionValuesDTOs,
                workReportLineDTOs);

    }
View Full Code Here

TOP

Related Classes of org.libreplan.ws.workreports.api.WorkReportDTO

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.