Package org.jbpm.formapi.shared.menu

Examples of org.jbpm.formapi.shared.menu.ValidationDescription


        jaxbSimulation(dto, ListValidationsDTO.class, ListValidationsDTO.RELATED_CLASSES);
    }
   
    public void testListValidationsDTOManyItems() throws Exception {
        List<ValidationDescription> validations = new ArrayList<ValidationDescription>();
        ValidationDescription validation1 = new ValidationDescription();
        validation1.setClassName("org.jbpm.formbuilder.ThisClassDoesntExist");
        validation1.setProperties(new HashMap<String, String>());
        validations.add(validation1);
        ValidationDescription validation2 = new ValidationDescription();
        validation2.setClassName("org.jbpm.formbuilder.client.validation.NotEmptyValidationItem");
        Map<String, String> notEmptyProps = new HashMap<String, String>();
        notEmptyProps.put("message", "aaa");
        notEmptyProps.put("message2", "bbb");
        validation2.setProperties(notEmptyProps);
        validations.add(validation2);
        ValidationDescription validation3 = new ValidationDescription();
        validation3.setClassName("org.jbpm.formbuilder.client.validation.SomethingValidationItem");
        Map<String, String> somethingProps = new HashMap<String, String>();
        somethingProps.put("message", "aaa");
        validation3.setProperties(somethingProps);
        validations.add(validation3);
        ListValidationsDTO dto = new ListValidationsDTO(validations);
        jaxbSimulation(dto, ListValidationsDTO.class, ListValidationsDTO.RELATED_CLASSES);
    }
View Full Code Here


    //test happy path for RESTMenuService.getValidations()
    public void testGetValidationsOK() throws Exception {
        RESTMenuService restService = new RESTMenuService();
        MenuService menuService = EasyMock.createMock(MenuService.class);
        List<ValidationDescription> retval = new ArrayList<ValidationDescription>();
        ValidationDescription validation1 = new ValidationDescription();
        validation1.setClassName("aaa");
        validation1.setProperties(new HashMap<String, String>());
        ValidationDescription validation2 = new ValidationDescription();
        validation2.setClassName("bbb");
        Map<String, String> properties = new HashMap<String, String>();
        properties.put("ccc", "CCC");
        properties.put("ddd", "DDD");
        validation2.setProperties(properties);
        retval.add(validation1);
        retval.add(validation2);
        EasyMock.expect(menuService.listValidations()).andReturn(retval).once();
        restService.setMenuService(menuService);
       
View Full Code Here

        editOption.setSubMenu(editMenu);
       
        options.add(saveOption);
        options.add(editOption);
       
        ValidationDescription notEmptyDesc = new ValidationDescription();
        notEmptyDesc.setClassName("org.jbpm.formbuilder.client.validation.NotEmptyValidationItem");
        notEmptyDesc.getProperties().put("errorMessage", "Should not be empty");
       
        validations.add(notEmptyDesc);
    }
View Full Code Here

TOP

Related Classes of org.jbpm.formapi.shared.menu.ValidationDescription

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.