use of com.archimatetool.editor.diagram.ArchimateDiagramModelFactory in project archi by archimatetool.
the class ArchimateDiagramConnectionPolicyTests method testGetConnectionCreateCommand_CreatesArchimateConnectionCommand.
@Test
public void testGetConnectionCreateCommand_CreatesArchimateConnectionCommand() throws Exception {
setupSourcePolicy(IArchimateFactory.eINSTANCE.createBusinessActor());
CreateConnectionRequest request = new CreateConnectionRequest();
request.setFactory(new ArchimateDiagramModelFactory(IArchimatePackage.eINSTANCE.getAssignmentRelationship()));
Command cmd = sourcePolicy.getConnectionCreateCommand(request);
assertNotNull(cmd);
assertTrue(cmd.getClass() == CreateDiagramArchimateConnectionWithDialogCommand.class);
assertEquals(cmd, request.getStartCommand());
assertEquals(sourceDiagramObject, TestUtils.getPrivateField(cmd, "fSource"));
}
Aggregations