use of org.opentosca.toscana.core.testdata.TestPlugins.PLATFORMS in project TOSCAna by StuPro-TOSCAna.
the class TransformerHealthIndicatorTest method testPlatformList.
@Test
public void testPlatformList() throws Exception {
when(pluginService.getSupportedPlatforms()).thenReturn(PLATFORMS);
String json = getHealthAsString();
List<String> platforms = getPlatforms(json);
assertEquals(PLATFORMS.size(), platforms.size());
Map<String, Boolean> foundPlatforms = new HashMap<>();
for (Platform platform : PLATFORMS) {
foundPlatforms.put(platform.id, false);
for (String p : platforms) {
if (p.equals(platform.id)) {
log.info("Found platform {}", p);
foundPlatforms.put(p, true);
}
}
}
assertTrue("Could not find all platforms", foundPlatforms.values().stream().allMatch(e -> e));
}
Aggregations