use of org.opentosca.toscana.model.capability.DatabaseEndpointCapability in project TOSCAna by StuPro-TOSCAna.
the class ServiceGraphTest method requirementTest.
@Test
public void requirementTest() {
currentFile = REQUIREMENT;
Optional<Entity> fulfiller = getGraph().getEntity(Lists.newArrayList("topology_template", "node_templates", "test-node", "requirements", "test-requirement1", "node"));
assertTrue(fulfiller.isPresent());
Optional<Entity> fulfiller2 = getGraph().getEntity(Lists.newArrayList("topology_template", "node_templates", "test-node", "requirements", "test-requirement2", "node"));
assertTrue(fulfiller2.isPresent());
MappingEntity capabilityEntity = (MappingEntity) getGraph().getEntity(new EntityId(Lists.newArrayList("topology_template", "node_templates", "test-node", "requirements", "test-requirement2", "capability"))).get();
DatabaseEndpointCapability capability = TypeWrapper.wrapTypedElement(capabilityEntity);
assertNotNull(capability);
MappingEntity relationshipEntity = (MappingEntity) getGraph().getEntity(new EntityId(Lists.newArrayList("topology_template", "node_templates", "test-node", "requirements", "test-requirement2", "relationship"))).get();
ConnectsTo relationship = TypeWrapper.wrapTypedElement(relationshipEntity);
assertNotNull(relationship);
assertEquals(Lists.newArrayList("1", "2"), getList("topology_template", "node_templates", "test-node", "requirements", "test-requirement2", "occurrences"));
}
Aggregations