X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Forg%2Fonap%2Faai%2Fbabel%2Fparser%2FTestArtifactGeneratorToscaParser.java;h=acc4a352ec6a59d67e0d8fee38717551ca202ba7;hb=5a6fd49a6aca3a567464527335b107746e28f3bd;hp=2de10b96fb9db26488079fc631d09dcf8fbc70b2;hpb=4e828f7f2037735de2253a0dcc2b557c88c15cd3;p=aai%2Fbabel.git diff --git a/src/test/java/org/onap/aai/babel/parser/TestArtifactGeneratorToscaParser.java b/src/test/java/org/onap/aai/babel/parser/TestArtifactGeneratorToscaParser.java index 2de10b9..acc4a35 100644 --- a/src/test/java/org/onap/aai/babel/parser/TestArtifactGeneratorToscaParser.java +++ b/src/test/java/org/onap/aai/babel/parser/TestArtifactGeneratorToscaParser.java @@ -122,25 +122,41 @@ public class TestArtifactGeneratorToscaParser { } /** - * Initialise the Artifact Generator Widget Mapping config with incomplete data (no type). + * Initialize the Artifact Generator Widget Mapping config with incomplete data (no type). + * + * @throws IOException */ - @Test(expected = IllegalArgumentException.class) - public void testToscaMappingWithoutType() { + @Test(expected = IOException.class) + public void testToscaMappingWithoutType() throws IOException { WidgetMapping invalidMapping = new WidgetMapping(); invalidMapping.setType(null); WidgetConfigurationUtil.setWidgetMappings(Collections.singletonList(invalidMapping)); } /** - * Initialise the Artifact Generator Widget Mapping config with incomplete data (no widget name). + * Initialize the Artifact Generator Widget Mapping config with invalid data (type value). + * + * @throws IOException */ - @Test(expected = IllegalArgumentException.class) - public void testToscaMappingWithoutWidget() { + @Test(expected = IOException.class) + public void testToscaMappingWithInvalidType() throws IOException { + WidgetMapping invalidMapping = new WidgetMapping(); + invalidMapping.setType("invalid"); + WidgetConfigurationUtil.setWidgetMappings(Collections.singletonList(invalidMapping)); + } + + /** + * Initialize the Artifact Generator Widget Mapping config with incomplete data (no widget name). + * + * @throws IOException + */ + @Test(expected = IOException.class) + public void testToscaMappingWithoutWidget() throws IOException { WidgetMapping invalidMapping = new WidgetMapping(); invalidMapping.setWidget(null); WidgetConfigurationUtil.setWidgetMappings(Collections.singletonList(invalidMapping)); } - + /** * Process a dummy Group object for a Service Resource. *