{
put("instance-property", "ok");
}
});// Collections.<String, String> emptyMap()
S07ImplementationImporter18 dependency = (S07ImplementationImporter18) instance
.getServiceObject();
auxListProperties(dependency.getInjected());
auxListInstances();
ComponentImpl ci = (ComponentImpl) instance;
Assert.assertTrue(
String.format(
"Only one link should have been created, but %s links were found",
ci.getLocalLinks().size()),
ci.getLocalLinks().size() == 1);
for (Link link : ci.getLocalLinks()) {
validateSourceTargetTypes(link.getSource(), link.getDestination(),
Instance.class, Implementation.class);
}
String messageTemplate = "Declaring a relation from source %s to target %s, instantiated object of the type %s which is not the targetKind expected.";
Assert.assertTrue(
String.format(messageTemplate, "Instance", "Implementation",
instance.getServiceObject()),
dependency.getInjected().getProperty("instance-property") == null
&& dependency.getInjected().getProperty(
"implementation-property") != null
&& dependency.getInjected().getProperty(
"specification-property") != null);
}