use of com.archimatetool.model.IProperty in project archi by archimatetool.
the class TextRendererTests method render_PropertyKey_Indirection.
// ============================= Property Expression Tests =========================================
@Test
public void render_PropertyKey_Indirection() {
IDiagramModelArchimateObject dmo = createDiagramModelObject();
addProperty(dmo.getArchimateConcept(), "en", "English");
addProperty(dmo.getArchimateConcept(), "fr", "French");
IProperty property = TextRendererTests.addProperty(dmo.getArchimateModel(), "lang", "en");
assertEquals("English", textRenderer.renderWithExpression(dmo, "${property:$model{property:lang}}"));
property.setValue("fr");
assertEquals("French", textRenderer.renderWithExpression(dmo, "${property:$model{property:lang}}"));
assertEquals("French French", textRenderer.renderWithExpression(dmo, "${property:$model{property:lang}} ${property:$model{property:lang}}"));
}
use of com.archimatetool.model.IProperty in project archi by archimatetool.
the class ArchimateFactoryTests method createProperty_WithParamaters.
@Test
public void createProperty_WithParamaters() {
IProperty p = IArchimateFactory.eINSTANCE.createProperty("key", "value");
assertNotNull(p);
assertEquals("key", p.getKey());
assertEquals("value", p.getValue());
}
Aggregations