aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/org
diff options
context:
space:
mode:
authorTufman, Shay <tufman@gmail.com>2018-11-20 14:48:55 +0200
committerTufman, Shay <st198j@intl.att.com>2018-11-20 16:15:10 +0200
commite794b73443f37d92ea122336324e17709824df9d (patch)
tree82839f876b704aab34cfdffc591a2325f23adf75 /src/test/java/org
parentd2ed3bc4effb38ad3cf157483127abeee39c25c1 (diff)
fix null pointer1.4.7
Change-Id: If530734b96c32b25b2ed5df847c83dca2c633184 Issue-ID: SDC-1926 Signed-off-by: Tufman, Shay <st198j@intl.att.com>
Diffstat (limited to 'src/test/java/org')
-rw-r--r--src/test/java/org/onap/sdc/toscaparser/api/JToscaImportTest.java10
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());