use of org.kie.workbench.common.stunner.bpmn.workitem.WorkItemDefinition in project kie-wb-common by kiegroup.
the class WorkItemDefinitionClientParserTest method testMissingParameters.
@Test
public void testMissingParameters() {
String widFile = loadTestFile(MISSING_PARAMETERS_WID_FILE);
List<WorkItemDefinition> defs = WorkItemDefinitionClientParser.parse(widFile);
assertEquals(1, defs.size());
WorkItemDefinition wid1 = defs.get(0);
assertEquals("Email", wid1.getName());
assertEquals("Display Email", wid1.getDisplayName());
assertEquals("defaultemailicon.gif", wid1.getIconDefinition().getUri());
assertEquals(BPMNCategories.CUSTOM_TASKS, wid1.getCategory());
assertEquals("Some documentation", wid1.getDocumentation());
assertTrue(wid1.getResults().isEmpty());
assertTrue(wid1.getParameters().isEmpty());
}
use of org.kie.workbench.common.stunner.bpmn.workitem.WorkItemDefinition in project kie-wb-common by kiegroup.
the class WorkItemDefinitionClientParserTest method testMissingName.
@Test
public void testMissingName() {
String widFile = loadTestFile(MISSING_NAME_WID_FILE);
List<WorkItemDefinition> defs = WorkItemDefinitionClientParser.parse(widFile);
assertEquals(1, defs.size());
WorkItemDefinition wid = defs.get(0);
assertEquals("", wid.getName());
assertEquals("Display Email", wid.getDisplayName());
assertEquals("defaultemailicon.gif", wid.getIconDefinition().getUri());
assertEquals(BPMNCategories.CUSTOM_TASKS, wid.getCategory());
assertEquals("Some documentation", wid.getDocumentation());
assertTrue(wid.getResults().isEmpty());
assertEquals(EMAIL_WID_EXTRACTED_PARAMETERS, wid.getParameters());
}
use of org.kie.workbench.common.stunner.bpmn.workitem.WorkItemDefinition in project kie-wb-common by kiegroup.
the class WorkItemDefinitionClientParserTest method testAllParametersPresent.
@Test
public void testAllParametersPresent() {
String widFile = loadTestFile(ALL_PARAMETERS_WID_FILE);
List<WorkItemDefinition> defs = WorkItemDefinitionClientParser.parse(widFile);
assertEquals(1, defs.size());
WorkItemDefinition wid = defs.get(0);
assertEquals("Email", wid.getName());
assertEquals("Display Email", wid.getDisplayName());
assertEquals("defaultemailicon.gif", wid.getIconDefinition().getUri());
assertEquals("new org.package.DefaultHandler()", wid.getDefaultHandler());
assertEquals("Some description", wid.getDescription());
assertEquals(BPMNCategories.CUSTOM_TASKS, wid.getCategory());
assertEquals("Some documentation", wid.getDocumentation());
assertEquals(EMAIL_WID_EXTRACTED_PARAMETERS, wid.getParameters());
assertEquals(EMAIL_WID_RETURN_EXTRACTED_PARAMETERS, wid.getResults());
}
Aggregations