use of org.opentosca.toscana.model.BaseToscaElement in project TOSCAna by StuPro-TOSCAna.
the class TypeResolverTest method supportForAllWineryNodeTypes.
@Test
public void supportForAllWineryNodeTypes() {
Set<String> wineryNodeTypes = getWineryNodeTypes();
for (String nodeType : wineryNodeTypes) {
logger.info("Testing conversion of type '{}'", nodeType);
ServiceGraph graph = new ServiceGraph(logMock());
MappingEntity nodeEntity = new MappingEntity(ToscaStructure.NODE_TEMPLATES.descend("my-node"), graph);
graph.addEntity(nodeEntity);
ScalarEntity typeEntity = new ScalarEntity(nodeType, nodeEntity.getId().descend("type"), graph);
graph.addEntity(typeEntity);
BaseToscaElement node = TypeWrapper.wrapTypedElement(nodeEntity);
assertNotNull(node);
logger.info("Node Type '{}': known", nodeType);
System.out.println();
}
// successful if no exception thrown
}
Aggregations