Search in sources :

Example 1 with ArchimateDiagramPart

use of com.archimatetool.editor.diagram.editparts.ArchimateDiagramPart in project archi by archimatetool.

the class ArchimateDiagramModelUIProviderTests method testCreateEditPart.

@Override
public void testCreateEditPart() {
    EditPart editPart = provider.createEditPart();
    assertTrue(editPart instanceof ArchimateDiagramPart);
}
Also used : ArchimateDiagramPart(com.archimatetool.editor.diagram.editparts.ArchimateDiagramPart) EditPart(org.eclipse.gef.EditPart)

Example 2 with ArchimateDiagramPart

use of com.archimatetool.editor.diagram.editparts.ArchimateDiagramPart in project archi by archimatetool.

the class PropertiesLabelProviderTests method testGetTextDiagramModel.

@Test
public void testGetTextDiagramModel() {
    // Text for diagram model
    IArchimateDiagramModel dm = IArchimateFactory.eINSTANCE.createArchimateDiagramModel();
    String text = provider.getText(new StructuredSelection(dm));
    assertEquals("View", text);
    // Text for EditPart
    ArchimateDiagramPart editPart = new ArchimateDiagramPart();
    editPart.setModel(dm);
    text = provider.getText(new StructuredSelection(editPart));
    assertEquals("View", text);
}
Also used : ArchimateDiagramPart(com.archimatetool.editor.diagram.editparts.ArchimateDiagramPart) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) IArchimateDiagramModel(com.archimatetool.model.IArchimateDiagramModel) Test(org.junit.Test)

Aggregations

ArchimateDiagramPart (com.archimatetool.editor.diagram.editparts.ArchimateDiagramPart)2 IArchimateDiagramModel (com.archimatetool.model.IArchimateDiagramModel)1 EditPart (org.eclipse.gef.EditPart)1 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)1 Test (org.junit.Test)1