Search in sources :

Example 16 with BPMNDiagramImpl

use of org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagramImpl in project kie-wb-common by kiegroup.

the class BPMNDiagramTest method testPackageInvalid.

@Test
public void testPackageInvalid() {
    BPMNDiagramImpl BPMNDiagramImpl = createValidBpmnDiagram();
    BPMNDiagramImpl.getDiagramSet().setPackageProperty(new Package(PACKAGE_INVALID));
    Set<ConstraintViolation<BPMNDiagramImpl>> violations = this.validator.validate(BPMNDiagramImpl);
    assertEquals(1, violations.size());
}
Also used : ConstraintViolation(javax.validation.ConstraintViolation) BPMNDiagramImpl(org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagramImpl) Package(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.Package) Test(org.junit.Test)

Aggregations

BPMNDiagramImpl (org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagramImpl)16 Test (org.junit.Test)9 ProcessVariables (org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessVariables)7 View (org.kie.workbench.common.stunner.core.graph.content.view.View)7 ConstraintViolation (javax.validation.ConstraintViolation)5 BPMNDiagram (org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagram)5 DiagramSet (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.DiagramSet)5 Element (org.kie.workbench.common.stunner.core.graph.Element)5 FlowElement (org.eclipse.bpmn2.FlowElement)4 ItemAwareElement (org.eclipse.bpmn2.ItemAwareElement)4 RootElement (org.eclipse.bpmn2.RootElement)4 ProcessData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessData)4 Metadata (org.kie.workbench.common.stunner.core.diagram.Metadata)4 Graph (org.kie.workbench.common.stunner.core.graph.Graph)4 Id (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.Id)3 Package (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.Package)3 Version (org.kie.workbench.common.stunner.bpmn.definition.property.diagram.Version)3 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)3 ArrayList (java.util.ArrayList)1 Process (org.eclipse.bpmn2.Process)1