diff options
Diffstat (limited to 'src/test/java/org')
-rw-r--r-- | src/test/java/org/onap/sdc/toscaparser/api/JToscaImportTest.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/java/org/onap/sdc/toscaparser/api/JToscaImportTest.java b/src/test/java/org/onap/sdc/toscaparser/api/JToscaImportTest.java index 6fc8771..8e587a9 100644 --- a/src/test/java/org/onap/sdc/toscaparser/api/JToscaImportTest.java +++ b/src/test/java/org/onap/sdc/toscaparser/api/JToscaImportTest.java @@ -111,6 +111,16 @@ public class JToscaImportTest { assertNull(nodeTemplate.getPropertyValueFromTemplatesByName("test")); } + @Test + public void testNullValueHasNoNullPointerException() throws JToscaException { + + String fileStr = JToscaImportTest.class.getClassLoader().getResource("csars/service-JennyVtsbcKarunaSvc-csar.csar").getFile(); + File file = new File(fileStr); + ToscaTemplate toscaTemplate = new ToscaTemplate(file.getAbsolutePath(), null, true, null); + List<Input> inputs = toscaTemplate.getInputs(); + assertNotNull(inputs); + } + private void validateInputsAnnotations(List<Input> inputs) { List<Input> inputsWithAnnotations = inputs.stream().filter(i -> i.getAnnotations() != null) .collect(Collectors.toList()); |