Examples of LabelTypeListDTO


Examples of org.libreplan.ws.labels.api.LabelTypeListDTO

        for (LabelType label : labelTypes) {
            labelTypeDTOs.add(toDTO(label));
        }

        return new LabelTypeListDTO(labelTypeDTOs);
    }
View Full Code Here

Examples of org.libreplan.ws.labels.api.LabelTypeListDTO

    @Override
    @GET
    @Transactional(readOnly = true)
    public LabelTypeListDTO getLabelTypes() {
        return new LabelTypeListDTO(findAll());
    }
View Full Code Here

Examples of org.libreplan.ws.labels.api.LabelTypeListDTO

    @Test
    @Transactional
    public void exportLabelTypes() {
        int previous = labelTypeDAO.getAll().size();
        LabelTypeListDTO labelTypes = labelService.getLabelTypes();
        assertTrue(labelTypes.labelTypes.size() == previous);
    }
View Full Code Here

Examples of org.libreplan.ws.labels.api.LabelTypeListDTO

    public void exportLabelTypes2() {
        int previous = labelTypeDAO.getAll().size();

        LabelType labelType = givenLabelTypeStored();

        LabelTypeListDTO labelTypes = labelService.getLabelTypes();
        assertThat(labelTypes.labelTypes.size(), equalTo(previous + 1));

        for (LabelTypeDTO typeDTO : labelTypes.labelTypes) {
            if ((typeDTO.code.equalsIgnoreCase(labelType.getCode()))
                    && (typeDTO.labels.size() == 2)) {
View Full Code Here

Examples of org.libreplan.ws.labels.api.LabelTypeListDTO

        int previous = labelTypeDAO.getAll().size();

        LabelTypeDTO labelTypeDTO = new LabelTypeDTO();

        List<InstanceConstraintViolationsDTO> instanceConstraintViolationsList = labelService
                .addLabelTypes(new LabelTypeListDTO(Arrays.asList(labelTypeDTO))).instanceConstraintViolationsList;
        assertThat(instanceConstraintViolationsList.size(), equalTo(1));

        List<ConstraintViolationDTO> constraintViolations = instanceConstraintViolationsList
                .get(0).constraintViolations;
        // Mandatory fields: code, name
View Full Code Here

Examples of org.libreplan.ws.labels.api.LabelTypeListDTO

        LabelTypeDTO labelTypeDTO = new LabelTypeDTO("label-type-name"
                + UUID.randomUUID().toString(), new ArrayList<LabelDTO>());

        List<InstanceConstraintViolationsDTO> instanceConstraintViolationsList = labelService
                .addLabelTypes(new LabelTypeListDTO(Arrays.asList(labelTypeDTO))).instanceConstraintViolationsList;
        assertThat(instanceConstraintViolationsList.size(), equalTo(0));

        int current = transactionService
                .runOnTransaction(new IOnTransaction<Integer>() {
View Full Code Here

Examples of org.libreplan.ws.labels.api.LabelTypeListDTO

        LabelTypeDTO labelTypeDTO1 = new LabelTypeDTO(nameType1,
                new ArrayList<LabelDTO>());
        LabelTypeDTO labelTypeDTO2 = new LabelTypeDTO(nameType2,
                new ArrayList<LabelDTO>());

        LabelTypeListDTO labelTypeDTOs = createLabelTypeListDTO(labelTypeDTO1,
                labelTypeDTO2);

        List<InstanceConstraintViolationsDTO> instanceConstraintViolationsList = labelService
                .addLabelTypes(labelTypeDTOs).instanceConstraintViolationsList;
View Full Code Here

Examples of org.libreplan.ws.labels.api.LabelTypeListDTO

                new ArrayList<LabelDTO>());
        LabelTypeDTO labelTypeDTO2 = new LabelTypeDTO(labelTypeName,
                new ArrayList<LabelDTO>());

        List<InstanceConstraintViolationsDTO> instanceConstraintViolationsList = labelService
                .addLabelTypes(new LabelTypeListDTO(Arrays.asList(
                        labelTypeDTO1, labelTypeDTO2))).instanceConstraintViolationsList;
        assertThat(instanceConstraintViolationsList.size(), equalTo(1));
        assertThat(instanceConstraintViolationsList.get(0).numItem,
                equalTo(new Long(2)));
View Full Code Here

Examples of org.libreplan.ws.labels.api.LabelTypeListDTO

        LabelTypeDTO labelTypeDTO = new LabelTypeDTO("label-type-nameY",
                labelDTOs);

        List<InstanceConstraintViolationsDTO> instanceConstraintViolationsList = labelService
                .addLabelTypes(new LabelTypeListDTO(Arrays.asList(labelTypeDTO))).instanceConstraintViolationsList;
        assertThat(instanceConstraintViolationsList.size(), equalTo(0));

        List<LabelType> labelTypes = transactionService
                .runOnTransaction(new IOnTransaction<List<LabelType>>() {
                    @Override
View Full Code Here

Examples of org.libreplan.ws.labels.api.LabelTypeListDTO

        LabelTypeDTO labelTypeDTO = new LabelTypeDTO(name,
                new ArrayList<LabelDTO>());

        List<InstanceConstraintViolationsDTO> instanceConstraintViolationsList = labelService
                .addLabelTypes(new LabelTypeListDTO(Arrays.asList(labelTypeDTO))).instanceConstraintViolationsList;
        assertThat(instanceConstraintViolationsList.size(), equalTo(1));

        current = transactionService
                .runOnTransaction(new IOnTransaction<Integer>() {
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.