diff options
Diffstat (limited to 'vid-app-common/src/test')
-rw-r--r-- | vid-app-common/src/test/java/org/onap/vid/asdc/parser/VidNotionsBuilderTest.java | 19 | ||||
-rw-r--r-- | vid-app-common/src/test/resources/macro_services_by_invariant_uuid.json | 4 |
2 files changed, 23 insertions, 0 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/asdc/parser/VidNotionsBuilderTest.java b/vid-app-common/src/test/java/org/onap/vid/asdc/parser/VidNotionsBuilderTest.java index c136f36e4..c32dd2141 100644 --- a/vid-app-common/src/test/java/org/onap/vid/asdc/parser/VidNotionsBuilderTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/asdc/parser/VidNotionsBuilderTest.java @@ -534,4 +534,23 @@ public class VidNotionsBuilderTest { assertEquals(expectedViewEditUi, vidNotionsBuilder.suggestViewEditUI(csarHelper, serviceModel, ModelCategory.OTHER)); } + + @DataProvider + public static Object[][] invariantUuidToMacroDataProvider() { + return new Object[][]{ + {"117f5f1a-1b47-4ae1-ae04-489c9a7ada28", true}, + {"117F5f1a-1b47-4AE1-ae04-489C9A7ada28", true}, + {"2efab359-cdd4-4da2-9b79-61df990796c2", true}, + {"67e09a1f-9e42-4b63-8dee-bc60bae50de1", false}, + {"67e09A1F-9E42-4b63-8Dee-bc60bae50de1", false}, + {"5d854f6b-759c-4aa6-b472-7e4bb1c003d4", false}, + {"I'm not a uuid", false}, + {null, false}, + }; + } + + @Test(dataProvider = "invariantUuidToMacroDataProvider") + public void testIsMacroByInvariantUuid(String uuid, boolean expectedIsMacro) { + assertEquals(expectedIsMacro, vidNotionsBuilder.isMacroByInvariantUuid(uuid)); + } } diff --git a/vid-app-common/src/test/resources/macro_services_by_invariant_uuid.json b/vid-app-common/src/test/resources/macro_services_by_invariant_uuid.json new file mode 100644 index 000000000..3afb9321a --- /dev/null +++ b/vid-app-common/src/test/resources/macro_services_by_invariant_uuid.json @@ -0,0 +1,4 @@ +[ + "117f5f1a-1b47-4ae1-ae04-489c9a7ada28", + "2efab359-cdd4-4da2-9b79-61df990796c2" +] |