diff options
Diffstat (limited to 'catalog-be/src/test/java')
-rw-r--r-- | catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogicTest.java | 15 |
1 files changed, 15 insertions, 0 deletions
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"; |