use of io.fabric8.openshift.api.model.Template in project fabric8 by fabric8io.
the class ParseTest method testParseTemplate.
@Test
public void testParseTemplate() throws Exception {
Template template = assertParseExampleFile("template.json", Template.class);
List<HasMetadata> objects = template.getObjects();
assertNotEmpty("objects", objects);
assertTrue("size is " + objects.size(), objects.size() == 2);
Object service = objects.get(0);
assertThat(service).isInstanceOf(Service.class);
Object rc = objects.get(1);
assertThat(rc).isInstanceOf(ReplicationController.class);
System.out.println("Generated JSON: " + toJson(template));
}
Aggregations