use of org.opentosca.toscana.model.requirement.HostRequirement in project TOSCAna by StuPro-TOSCAna.
the class LinkResolverTest method resolveRequirementLink.
@Test
public void resolveRequirementLink() {
EffectiveModel model = new EffectiveModelFactory().create(REQUIREMENT, logMock());
WebServer node = (WebServer) model.getNodeMap().get("test-node1");
HostRequirement requirement = node.getHost();
assertNotNull(requirement);
Set<Compute> fulfillers = requirement.getFulfillers();
assertEquals(1, fulfillers.size());
Compute fulfiller = fulfillers.iterator().next();
assertEquals("test-node2", fulfiller.getEntityName());
}
Aggregations