use of org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent in project kie-wb-common by kiegroup.
the class ContextUtilsTest method testIsFormGenerationSupported.
@Test
public void testIsFormGenerationSupported() {
Assert.assertTrue(ContextUtils.isFormGenerationSupported(createNode(new UserTask())));
Assert.assertFalse(ContextUtils.isFormGenerationSupported(createNode(new ScriptTask())));
Assert.assertFalse(ContextUtils.isFormGenerationSupported(createNode(new BusinessRuleTask())));
Assert.assertFalse(ContextUtils.isFormGenerationSupported(createNode(new NoneTask())));
Assert.assertFalse(ContextUtils.isFormGenerationSupported(createNode(new StartNoneEvent())));
Assert.assertFalse(ContextUtils.isFormGenerationSupported(createNode(new EndNoneEvent())));
Assert.assertFalse(ContextUtils.isFormGenerationSupported(createNode(new ParallelGateway())));
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent in project kie-wb-common by kiegroup.
the class BPMNDiagramMarshallerTest method testUnmarshallStartNoneEvent.
@Test
@SuppressWarnings("unchecked")
public void testUnmarshallStartNoneEvent() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(BPMN_STARTNONEEVENT);
assertDiagram(diagram, 4);
assertEquals("startNoneEvent", diagram.getMetadata().getTitle());
Node<? extends Definition, ?> startNoneEventNode = diagram.getGraph().getNode("processStartEvent");
StartNoneEvent startNoneEvent = (StartNoneEvent) startNoneEventNode.getContent().getDefinition();
assertNotNull(startNoneEvent.getGeneral());
assertEquals("MyStartNoneEvent", startNoneEvent.getGeneral().getName().getValue());
assertEquals("MyStartNoneEventDocumentation", startNoneEvent.getGeneral().getDocumentation().getValue());
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent in project kie-wb-common by kiegroup.
the class StartNoneEventTest method testStartNoneEventNameValid.
@Test
public void testStartNoneEventNameValid() {
StartNoneEvent startNoneEvent = new StartNoneEvent.StartNoneEventBuilder().build();
startNoneEvent.getGeneral().setName(new Name(NAME_VALID));
Set<ConstraintViolation<StartNoneEvent>> violations = this.validator.validate(startNoneEvent);
assertTrue(violations.isEmpty());
}
Aggregations