Search in sources :

Example 1 with DirectionalAssociation

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

the class AssociationPropertyWriterTest method testSetOneDirectionAssociation.

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

Example 2 with DirectionalAssociation

use of org.kie.workbench.common.stunner.bpmn.definition.DirectionalAssociation 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 DirectionalAssociation (org.kie.workbench.common.stunner.bpmn.definition.DirectionalAssociation)2 NonDirectionalAssociation (org.kie.workbench.common.stunner.bpmn.definition.NonDirectionalAssociation)2 ConnectorShapeDef (org.kie.workbench.common.stunner.shapes.def.ConnectorShapeDef)1