summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/test/java/org
diff options
context:
space:
mode:
authorKrupaNagabhushan <krupa.nagabhushan@est.tech>2021-01-12 13:41:59 +0000
committerChristophe Closset <christophe.closset@intl.att.com>2021-04-09 06:46:27 +0000
commit6d65fde29c1859a7099d91ed0e8911bcb1823a38 (patch)
treea570de61d7bc39ccfdc2590d4813c97c2d58c18a /catalog-be/src/test/java/org
parent74f9a13c4211c5d75bbcff1ceb794bd060c6a49f (diff)
Allow property to take its value from defined input list
Issue-ID: SDC-3547 Change-Id: Ic438e8f8943d0f1c656e386611b88b25f879e83b Signed-off-by: KrupaNagabhushan <krupa.nagabhushan@est.tech> Signed-off-by: andre.schmid <andre.schmid@est.tech>
Diffstat (limited to 'catalog-be/src/test/java/org')
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogicTest.java10
1 files changed, 6 insertions, 4 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 8a2cdef16e..07fff19f0b 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
@@ -423,10 +423,12 @@ class ComponentInstanceBusinessLogicTest {
when(componentsUtils.convertFromStorageResponse(StorageOperationStatus.BAD_REQUEST))
.thenReturn(ActionStatus.INVALID_CONTENT);
- ComponentException e = assertThrows(ComponentException.class,
- () -> componentInstanceBusinessLogic.createOrUpdatePropertiesValues(
- ComponentTypeEnum.RESOURCE_INSTANCE, containerComponentID, resourceInstanceId, properties, "userId"));
- assertThat(e.getActionStatus()).isEqualTo(ActionStatus.INVALID_CONTENT);
+ final Either<List<ComponentInstanceProperty>, ResponseFormat> response = componentInstanceBusinessLogic.createOrUpdatePropertiesValues(
+ ComponentTypeEnum.RESOURCE_INSTANCE, containerComponentID, resourceInstanceId, properties, "userId");
+ assertThat(response.isRight()).as("Response should be an error").isTrue();
+ final ResponseFormat responseFormat = response.right().value();
+ assertThat(responseFormat.getStatus()).as("Response status should be as expected").isEqualTo(400);
+ assertThat(responseFormat.getMessageId()).as("Error message id should be as expected").isEqualTo("SVC4000");
}
@Test