X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Forg%2Fonap%2Faai%2Fbabel%2Fxml%2Fgenerator%2FTestModelGenerator.java;h=680a58a9bed2337c0070e00dc7173aed1481d132;hb=176c445bbeb5e47011ff2ca4816c00dd0f6ea779;hp=43f49a09b02d70b1a265f4cbd70f1a024fb99163;hpb=811169825805a7160a6dd28abb281f64a4a56c71;p=aai%2Fbabel.git diff --git a/src/test/java/org/onap/aai/babel/xml/generator/TestModelGenerator.java b/src/test/java/org/onap/aai/babel/xml/generator/TestModelGenerator.java index 43f49a0..680a58a 100644 --- a/src/test/java/org/onap/aai/babel/xml/generator/TestModelGenerator.java +++ b/src/test/java/org/onap/aai/babel/xml/generator/TestModelGenerator.java @@ -21,13 +21,14 @@ package org.onap.aai.babel.xml.generator; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.io.IOException; import java.util.Collections; import java.util.List; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.onap.aai.babel.service.data.BabelArtifact; import org.onap.aai.babel.testdata.CsarTest; import org.onap.aai.babel.util.ArtifactTestUtils; @@ -43,16 +44,18 @@ public class TestModelGenerator { System.setProperty("APP_HOME", "."); } - @Before + @BeforeEach public void setup() { new ArtifactTestUtils().setGeneratorSystemProperties(); } - @Test(expected = Test.None.class /* no exception expected */) + @Test public void testDefaultServiceVersion() throws XmlArtifactGenerationException, IOException { - Artifact ymlFile = new Artifact(null, null, null, null); - new ModelGenerator().generateArtifacts(CsarTest.SD_WAN_CSAR_FILE.getContent(), - Collections.singletonList(ymlFile)); + assertDoesNotThrow(() -> { + Artifact ymlFile = new Artifact(null, null, null, null); + new ModelGenerator().generateArtifacts(CsarTest.SD_WAN_CSAR_FILE.getContent(), + Collections.singletonList(ymlFile)); + }); } @Test