diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-03-01 13:35:53 +0100 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-03-01 13:36:47 +0100 |
commit | 176c445bbeb5e47011ff2ca4816c00dd0f6ea779 (patch) | |
tree | d759d004aaf58aa38a29b1e9656c28786ca423f2 /src/test/java/org/onap/aai/babel/xml/generator/model/TestModel.java | |
parent | 811169825805a7160a6dd28abb281f64a4a56c71 (diff) |
Update aai-parent in babel to 1.13.3
- update aai-parent from 1.9.4 to 1.13.3
- update spring-boot from 2.1 to 2.4
- migrate junit 4 to junit 5
Issue-ID: AAI-3791
Change-Id: I849c830f9f0addfb2d4d48d20f038afd401858d2
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'src/test/java/org/onap/aai/babel/xml/generator/model/TestModel.java')
-rw-r--r-- | src/test/java/org/onap/aai/babel/xml/generator/model/TestModel.java | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/test/java/org/onap/aai/babel/xml/generator/model/TestModel.java b/src/test/java/org/onap/aai/babel/xml/generator/model/TestModel.java index 700cf38..93dd443 100644 --- a/src/test/java/org/onap/aai/babel/xml/generator/model/TestModel.java +++ b/src/test/java/org/onap/aai/babel/xml/generator/model/TestModel.java @@ -23,11 +23,13 @@ package org.onap.aai.babel.xml.generator.model; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.nullValue; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; +import static org.junit.jupiter.api.Assertions.assertThrows; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import org.onap.aai.babel.util.ArtifactTestUtils; /** @@ -42,7 +44,7 @@ public class TestModel { * @throws IOException * if the mappings configuration cannot be loaded */ - @BeforeClass + @BeforeAll public static void setup() throws IOException { new ArtifactTestUtils().loadWidgetMappings(); } @@ -74,18 +76,22 @@ public class TestModel { /** * Test that there is no exception if processing a Model that has no metadata properties. */ - @Test(expected = Test.None.class /* no exception expected */) + @Test public void testNullIdentProperties() { - createTestModel().populateModelIdentificationInformation(null); + assertDoesNotThrow(() -> { + createTestModel().populateModelIdentificationInformation(null); + }); } /** * Test that an exception occurs if calling code passes an unsupported Widget Type value to the base implementation * of the hasWidgetType() method. */ - @Test(expected = IllegalArgumentException.class) + @Test public void testUnknownWidgetType() { - createTestModel().hasWidgetType(null); + assertThrows(IllegalArgumentException.class, () -> { + createTestModel().hasWidgetType(null); + }); } /** |