From 6d65fde29c1859a7099d91ed0e8911bcb1823a38 Mon Sep 17 00:00:00 2001 From: KrupaNagabhushan Date: Tue, 12 Jan 2021 13:41:59 +0000 Subject: Allow property to take its value from defined input list Issue-ID: SDC-3547 Change-Id: Ic438e8f8943d0f1c656e386611b88b25f879e83b Signed-off-by: KrupaNagabhushan Signed-off-by: andre.schmid --- .../be/components/impl/ComponentInstanceBusinessLogicTest.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'catalog-be/src/test/java/org/openecomp') 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, 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 -- cgit 1.2.3-korg