aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/test
diff options
context:
space:
mode:
authorgolabek <tomasz.golabek@nokia.com>2019-02-27 16:47:09 +0100
committergolabek <tomasz.golabek@nokia.com>2019-03-08 13:27:55 +0100
commitff08d87f973c3aa4c041a55d42ae73a51593b7ca (patch)
treeadd13e327f2c50f4dcd0911d112f347a0caf240d /vid-app-common/src/test
parent58cbfa63f239b22e8feb1440919b5fc2cf0118ce (diff)
VnfInPlaceFields and ScaleOut rendered dynamically
* hardcoded workflows parameters moved to the internal API. * html changed to dynamically render parameters from the new API. Change-Id: Id2f61dbf88ae65401a8974422ab7c6da07053da2 Issue-ID: VID-398 Signed-off-by: Tomasz Golabek <tomasz.golabek@nokia.com>
Diffstat (limited to 'vid-app-common/src/test')
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/services/ExternalWorkflowServiceImplTest.java (renamed from vid-app-common/src/test/java/org/onap/vid/services/ExtWorkflowServiceImplTest.java)14
1 files changed, 6 insertions, 8 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/ExtWorkflowServiceImplTest.java b/vid-app-common/src/test/java/org/onap/vid/services/ExternalWorkflowServiceImplTest.java
index d8d8552ec..160ba97a5 100644
--- a/vid-app-common/src/test/java/org/onap/vid/services/ExtWorkflowServiceImplTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/services/ExternalWorkflowServiceImplTest.java
@@ -38,13 +38,11 @@ import org.onap.vid.model.SOWorkflowType;
import org.onap.vid.model.SOWorkflows;
import org.onap.vid.mso.MsoResponseWrapper2;
import org.onap.vid.mso.rest.MockedWorkflowsRestClient;
-import org.onap.vid.services.ExtWorkflowsServiceImpl.BadResponseFromMso;
+import org.onap.vid.services.ExternalWorkflowsServiceImpl.BadResponseFromMso;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-
-
-public class ExtWorkflowServiceImplTest {
+public class ExternalWorkflowServiceImplTest {
@Mock
private MockedWorkflowsRestClient client;
@@ -63,7 +61,7 @@ public class ExtWorkflowServiceImplTest {
@Test
public void shouldReturnWorkflowsOnValidResponse(){
// given
- ExtWorkflowsService extWorkflowsService = new ExtWorkflowsServiceImpl(client);
+ ExternalWorkflowsService extWorkflowsService = new ExternalWorkflowsServiceImpl(client);
Mockito.when(response.getStatus()).thenReturn(200);
Mockito.when(response.getBody()).thenReturn(new SOWorkflows(Collections.singletonList(new SOWorkflow(1L, "xyz"))));
MsoResponseWrapper2<SOWorkflows> msoResponseStub = new MsoResponseWrapper2<>(response);
@@ -78,7 +76,7 @@ public class ExtWorkflowServiceImplTest {
@Test(expectedExceptions = BadResponseFromMso.class)
public void shouldThrowBadResponseOnInvalidResponse(){
// given
- ExtWorkflowsService extWorkflowsService = new ExtWorkflowsServiceImpl(client);
+ ExternalWorkflowsService extWorkflowsService = new ExternalWorkflowsServiceImpl(client);
Mockito.when(response.getStatus()).thenReturn(500);
Mockito.when(response.getBody()).thenReturn(new SOWorkflows(Collections.singletonList(new SOWorkflow(1L, "xyz"))));
MsoResponseWrapper2<SOWorkflows> msoResponseStub = new MsoResponseWrapper2<>(response);
@@ -90,7 +88,7 @@ public class ExtWorkflowServiceImplTest {
@Test
public void shouldReturnWorkflowParametersOnValidResponse() {
SOWorkflowParameterDefinitions parameters = new SOWorkflowParameterDefinitions(Collections.singletonList(new SOWorkflowParameterDefinition(1L, "sample", "[0-9]", SOWorkflowType.STRING, true)));
- ExtWorkflowsService extWorkflowsService = new ExtWorkflowsServiceImpl(client);
+ ExternalWorkflowsService extWorkflowsService = new ExternalWorkflowsServiceImpl(client);
Mockito.when(parameterDefinitionsHttpResponse.getStatus()).thenReturn(200);
Mockito.when(parameterDefinitionsHttpResponse.getBody()).thenReturn(parameters);
MsoResponseWrapper2<SOWorkflowParameterDefinitions> msoResponseWrapper = new MsoResponseWrapper2<>(parameterDefinitionsHttpResponse);
@@ -104,7 +102,7 @@ public class ExtWorkflowServiceImplTest {
@Test
public void shouldProperlyHandleEmptyParametersList(){
- ExtWorkflowsService extWorkflowsService = new ExtWorkflowsServiceImpl(client);
+ ExternalWorkflowsService extWorkflowsService = new ExternalWorkflowsServiceImpl(client);
Mockito.when(parameterDefinitionsHttpResponse.getStatus()).thenReturn(200);
Mockito.when(parameterDefinitionsHttpResponse.getBody()).thenReturn(new SOWorkflowParameterDefinitions(Lists.newArrayList()));