Search in sources :

Example 1 with NonDirectionalAssociation

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

the class AssociationPropertyWriterTest method testSetNoneDirectionAssociation.

@Test
public void testSetNoneDirectionAssociation() {
    NonDirectionalAssociation nonDirectionalAssociation = new NonDirectionalAssociation();
    associationWriter.setDirectionAssociation(nonDirectionalAssociation);
    verify(association).setAssociationDirection(AssociationDirection.NONE);
}
Also used : NonDirectionalAssociation(org.kie.workbench.common.stunner.bpmn.definition.NonDirectionalAssociation) Test(org.junit.Test)

Example 2 with NonDirectionalAssociation

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

the class AssociationConnectorDefTest method getDirection.

@Test
public void getDirection() {
    ConnectorShapeDef.Direction direction = tested.getDirection(new DirectionalAssociation());
    assertEquals(ConnectorShapeDef.Direction.ONE, direction);
    direction = tested.getDirection(new NonDirectionalAssociation());
    assertEquals(ConnectorShapeDef.Direction.NONE, direction);
    direction = tested.getDirection(mock(Association.class));
    assertEquals(ConnectorShapeDef.Direction.ONE, direction);
}
Also used : NonDirectionalAssociation(org.kie.workbench.common.stunner.bpmn.definition.NonDirectionalAssociation) ConnectorShapeDef(org.kie.workbench.common.stunner.shapes.def.ConnectorShapeDef) DirectionalAssociation(org.kie.workbench.common.stunner.bpmn.definition.DirectionalAssociation) NonDirectionalAssociation(org.kie.workbench.common.stunner.bpmn.definition.NonDirectionalAssociation) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 NonDirectionalAssociation (org.kie.workbench.common.stunner.bpmn.definition.NonDirectionalAssociation)2 DirectionalAssociation (org.kie.workbench.common.stunner.bpmn.definition.DirectionalAssociation)1 ConnectorShapeDef (org.kie.workbench.common.stunner.shapes.def.ConnectorShapeDef)1