From f460e950df7c5a411f1efa5437c4b8ed403a77c8 Mon Sep 17 00:00:00 2001 From: Eylon Malin Date: Sun, 10 Nov 2019 12:24:11 +0200 Subject: VidNotion identify vlan tagging service Issue-ID: VID-701 Change-Id: Iffba5bca82e0511715e5ecb6b91cc9f4e077eaee Signed-off-by: Eylon Malin --- .../java/org/onap/vid/asdc/parser/VidNotionsBuilderTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'vid-app-common/src/test/java') 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 d6526d2f7..ec4bc2215 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 @@ -207,6 +207,16 @@ public class VidNotionsBuilderTest { assertThat(vidNotionsBuilder.suggestModelCategory(csarHelper, serviceModel), is(ModelCategory.PORT_MIRRORING)); } + @Test() + public void withoutMocks_givenToscaOfVLanTagging_InstantiationUIIsLegacyAndCategoryIsVlanTagging() throws SdcToscaParserException, IOException { + initServiceModelAndscarHelperWithRealCsar("/csars/service-VdorotheaSrv-csar.zip"); + when(featureManagerMock.isActive(Features.FLAG_2002_ANY_ALACARTE_BESIDES_EXCLUDED_NEW_INSTANTIATION_UI)).thenReturn(true); + assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel), is(InstantiationUI.LEGACY)); + assertThat(vidNotionsBuilder.suggestViewEditUI(csarHelper, serviceModel), is(InstantiationUI.LEGACY)); + assertThat(vidNotionsBuilder.suggestModelCategory(csarHelper, serviceModel), is(ModelCategory.VLAN_TAGGING)); + } + + @Test public void uuidIsExactly1ffce89fEtc_UIHintIsPositive() { initServiceModelAndscarHelperWithMocks(); -- cgit 1.2.3-korg