From ef6ec63b05fb93adef0edb392b0a33de97203876 Mon Sep 17 00:00:00 2001 From: "Liang.Ding" Date: Fri, 15 Mar 2019 08:16:42 +0000 Subject: show cloud specific artifacts IDs in vf module meta Change-Id: I42c54b2b94513c1dd69c3ec662a05a71a89fd3d0 Issue-ID: SDC-2041 Signed-off-by: Liang.Ding --- .../impl/ComponentInstanceBusinessLogicTest.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'catalog-be/src/test/java') diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogicTest.java index b5d937e0e8..360f12579a 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogicTest.java @@ -62,6 +62,7 @@ import org.openecomp.sdc.exception.ResponseFormat; import java.util.function.BiPredicate; import static org.junit.Assert.assertTrue; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.any; @@ -90,6 +91,11 @@ public class ComponentInstanceBusinessLogicTest { private final static String REQUIREMENT_UID = "requirementUid"; private final static String REQUIREMENT_NAME = "requirementName"; private final static String RELATIONSHIP_TYPE = "relationshipType"; + private final static String ARTIFACT_1 = "cloudtech_k8s_charts.zip"; + private final static String ARTIFACT_2 = "cloudtech_azure_day0.zip"; + private final static String ARTIFACT_3 = "cloudtech_aws_configtemplate.zip"; + private final static String ARTIFACT_4 = "k8s_charts.zip"; + private final static String ARTIFACT_5 = "cloudtech_openstack_configtemplate.zip"; @InjectMocks private static ComponentInstanceBusinessLogic componentInstanceBusinessLogic; @@ -154,6 +160,15 @@ public class ComponentInstanceBusinessLogicTest { getforwardingPathOnVersionChange(); } + @Test + public void testIsCloudSpecificArtifact() { + assertTrue(componentInstanceBusinessLogic.isCloudSpecificArtifact(ARTIFACT_1)); + assertTrue(componentInstanceBusinessLogic.isCloudSpecificArtifact(ARTIFACT_2)); + assertTrue(componentInstanceBusinessLogic.isCloudSpecificArtifact(ARTIFACT_3)); + assertFalse(componentInstanceBusinessLogic.isCloudSpecificArtifact(ARTIFACT_4)); + assertFalse(componentInstanceBusinessLogic.isCloudSpecificArtifact(ARTIFACT_5)); + } + private void getforwardingPathOnVersionChange(){ String containerComponentParam="services"; String containerComponentID="121-cont"; -- cgit 1.2.3-korg