Package org.libreplan.ws.common.api

Examples of org.libreplan.ws.common.api.OrderDTO


    @Test
    @Transactional
    public void orderWithInvalidOrderLineGroup() {
        int previous = orderDAO.getOrders().size();

        OrderDTO orderDTO = new OrderDTO();
        orderDTO.name = "Order name " + UUID.randomUUID().toString();
        orderDTO.code = "order-code " + UUID.randomUUID().toString();
        orderDTO.initDate = DateConverter.toXMLGregorianCalendar(new Date());

        OrderLineGroupDTO orderLineGroupDTO = new OrderLineGroupDTO();
View Full Code Here


    @Test
    @Transactional
    public void orderWithOrderLineGroupWithoutCode() {
        int previous = orderDAO.getOrders().size();

        OrderDTO orderDTO = new OrderDTO();
        orderDTO.name = "Order name " + UUID.randomUUID().toString();
        orderDTO.code = "order-code " + UUID.randomUUID().toString();
        orderDTO.initDate = DateConverter.toXMLGregorianCalendar(new Date());

        OrderLineGroupDTO orderLineGroupDTO = new OrderLineGroupDTO();
View Full Code Here

    @Test
    @Transactional
    public void orderWithOrderLineGroupWithoutHoursGroup() {
        int previous = orderDAO.getOrders().size();

        OrderDTO orderDTO = new OrderDTO();
        orderDTO.name = "Order name " + UUID.randomUUID().toString();
        orderDTO.code = "order-code " + UUID.randomUUID().toString();
        orderDTO.initDate = DateConverter.toXMLGregorianCalendar(new Date());

        OrderLineGroupDTO orderLineGroupDTO = new OrderLineGroupDTO();
View Full Code Here

    @Test
    @Transactional
    public void validOrderWithOrderLineGroup() {
        String code = UUID.randomUUID().toString();

        OrderDTO orderDTO = createOrderDTOWithChildren(code);

        OrderListDTO orderListDTO = createOrderListDTO(orderDTO);
        List<InstanceConstraintViolationsDTO> instanceConstraintViolationsList = orderElementService
                .addOrders(orderListDTO).instanceConstraintViolationsList;
        assertTrue(instanceConstraintViolationsList.toString(),
View Full Code Here

        checkIfExistsByCodeInAnotherTransaction(code);
    }

    private OrderDTO createOrderDTOWithChildren(String code) {
        OrderDTO orderDTO = new OrderDTO();
        orderDTO.name = "Order name " + UUID.randomUUID().toString();
        orderDTO.code = code;
        orderDTO.initDate = DateConverter.toXMLGregorianCalendar(new Date());

        OrderLineGroupDTO orderLineGroupDTO = new OrderLineGroupDTO();
View Full Code Here

    @Test
    @Transactional
    public void removeOrderElement() {
        final String code = UUID.randomUUID().toString();

        final OrderDTO orderDTO = createOrderDTOWithChildren(code);

        OrderListDTO orderListDTO = createOrderListDTO(orderDTO);
        List<InstanceConstraintViolationsDTO> instanceConstraintViolationsList = orderElementService
                .addOrders(orderListDTO).instanceConstraintViolationsList;
        assertTrue(instanceConstraintViolationsList.toString(),
View Full Code Here

    @Test
    @Transactional
    public void orderWithInvalidMaterialAssignment() {
        int previous = orderDAO.getOrders().size();

        OrderDTO orderDTO = new OrderDTO();
        orderDTO.name = "Order name " + UUID.randomUUID().toString();
        orderDTO.code = "order-code " + UUID.randomUUID().toString();
        orderDTO.initDate = DateConverter.toXMLGregorianCalendar(new Date());

        MaterialAssignmentDTO materialAssignmentDTO = new MaterialAssignmentDTO();
View Full Code Here

    @Test
    @Transactional
    public void orderWithInvalidMaterialAssignmentWithoutUnitsAndUnitPrice() {
        int previous = orderDAO.getOrders().size();

        OrderDTO orderDTO = new OrderDTO();
        orderDTO.name = "Order name " + UUID.randomUUID().toString();
        orderDTO.code = "order-code " + UUID.randomUUID().toString();
        orderDTO.initDate = DateConverter.toXMLGregorianCalendar(new Date());

        MaterialAssignmentDTO materialAssignmentDTO = new MaterialAssignmentDTO();
View Full Code Here

    @Test
    @Transactional
    public void validOrderWithMaterialAssignment() {
        String code = "order-code " + UUID.randomUUID().toString();

        OrderDTO orderDTO = new OrderDTO();
        orderDTO.name = "Order name " + UUID.randomUUID().toString();
        orderDTO.code = code;
        orderDTO.initDate = DateConverter.toXMLGregorianCalendar(new Date());

        MaterialAssignmentDTO materialAssignmentDTO = new MaterialAssignmentDTO();
View Full Code Here

    @Test
    @Transactional
    public void orderWithInvalidLabel() {
        int previous = orderDAO.getOrders().size();

        OrderDTO orderDTO = new OrderDTO();
        orderDTO.name = "Order name " + UUID.randomUUID().toString();
        orderDTO.code = "order-code " + UUID.randomUUID().toString();
        orderDTO.initDate = DateConverter.toXMLGregorianCalendar(new Date());

        LabelReferenceDTO labelReferenceDTO = new LabelReferenceDTO();
View Full Code Here

TOP

Related Classes of org.libreplan.ws.common.api.OrderDTO

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.