summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/test/java/org
diff options
context:
space:
mode:
authorWojciech Sliwka <wojciech.sliwka@nokia.com>2019-03-11 10:34:43 +0000
committerGerrit Code Review <gerrit@onap.org>2019-03-11 10:34:43 +0000
commite2617e9d5b82f2605e1660750a0dae96a077d83f (patch)
treed09784d14a28ec96325982c90e7767680d6f361f /vid-app-common/src/test/java/org
parent34498eadbb0a6f7f3a1c0058f3b57dc8049aca27 (diff)
parentff08d87f973c3aa4c041a55d42ae73a51593b7ca (diff)
Merge "VnfInPlaceFields and ScaleOut rendered dynamically"
Diffstat (limited to 'vid-app-common/src/test/java/org')
-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()));