Search in sources :

Example 1 with IArtifact

use of com.archimatetool.model.IArtifact in project archi by archimatetool.

the class FieldDataFactoryTests method testGetFieldValue_RelationTarget.

@Test
public void testGetFieldValue_RelationTarget() {
    IArchimateRelationship relation = IArchimateFactory.eINSTANCE.createServingRelationship();
    IArtifact target = IArchimateFactory.eINSTANCE.createArtifact();
    target.setName("target");
    relation.setTarget(target);
    Object o = FieldDataFactory.getFieldValue(relation, "relation_target");
    assertEquals("target", o);
}
Also used : IArchimateRelationship(com.archimatetool.model.IArchimateRelationship) IArtifact(com.archimatetool.model.IArtifact) Test(org.junit.Test)

Example 2 with IArtifact

use of com.archimatetool.model.IArtifact in project archi by archimatetool.

the class FieldDataFactoryTests method testGetFieldValue_Documentation.

@Test
public void testGetFieldValue_Documentation() {
    IArtifact element = IArchimateFactory.eINSTANCE.createArtifact();
    element.setDocumentation("Documentation");
    Object o = FieldDataFactory.getFieldValue(element, "documentation");
    assertEquals("Documentation", o);
}
Also used : IArtifact(com.archimatetool.model.IArtifact) Test(org.junit.Test)

Example 3 with IArtifact

use of com.archimatetool.model.IArtifact in project archi by archimatetool.

the class FieldDataFactoryTests method testGetFieldValue_RelationSource.

@Test
public void testGetFieldValue_RelationSource() {
    IArchimateRelationship relation = IArchimateFactory.eINSTANCE.createServingRelationship();
    IArtifact source = IArchimateFactory.eINSTANCE.createArtifact();
    source.setName("source");
    relation.setSource(source);
    Object o = FieldDataFactory.getFieldValue(relation, "relation_source");
    assertEquals("source", o);
}
Also used : IArchimateRelationship(com.archimatetool.model.IArchimateRelationship) IArtifact(com.archimatetool.model.IArtifact) Test(org.junit.Test)

Aggregations

IArtifact (com.archimatetool.model.IArtifact)3 Test (org.junit.Test)3 IArchimateRelationship (com.archimatetool.model.IArchimateRelationship)2