Package org.jbpm.formbuilder.server.xml

Examples of org.jbpm.formbuilder.server.xml.ListOptionsDTO


    @GET @Path("/options")
    public Response listMenuOptions() {
        init();
        try {
            List<MenuOptionDescription> options = menuService.listOptions();
            ListOptionsDTO dto = new ListOptionsDTO(options);
            return Response.ok(dto, MediaType.APPLICATION_XML).build();
        } catch (MenuServiceException e) {
            return error("Problem reading menu options", e);
        }
    }
View Full Code Here


        assertNotNull("resp.metadata shouldn't be null", resp.getMetadata());
        Object contentType = resp.getMetadata().getFirst(HttpHeaderNames.CONTENT_TYPE);
        assertNotNull("resp.entity shouldn't be null", contentType);
        assertEquals("contentType should be application/xml but is" + contentType, contentType, MediaType.APPLICATION_XML);
        assertTrue("entity should be of type ListOptionsDTO", entity instanceof ListOptionsDTO);
        ListOptionsDTO dto = (ListOptionsDTO) entity;
        List<MenuOptionDTO> options = dto.getMenuOption();
        assertNotNull("options shouldn't be null", options);
        assertFalse("options shouldn't be empty", options.isEmpty());
        assertEquals("options should have " + retval.size() + " elements but has " + options.size(), options.size(), retval.size());
    }
View Full Code Here

TOP

Related Classes of org.jbpm.formbuilder.server.xml.ListOptionsDTO

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.