diff options
author | marcinrzepeckiwroc <marcin.rzepecki@nokia.com> | 2020-07-01 14:16:21 +0200 |
---|---|---|
committer | marcinrzepeckiwroc <marcin.rzepecki@nokia.com> | 2020-07-06 16:20:29 +0200 |
commit | 674e896261f6edf614aa58fd91d9c8dfd4b8425a (patch) | |
tree | 7723a2d43e543e1f98bde41d8262f3712f6a3632 /bpmn/MSOCommonBPMN/src/test/java | |
parent | e196ac74e9566cebad4cfdc8191024ea251bdf9e (diff) |
BBInputSetup, getServiceInstanceHelper, mapCollection refactoring
Deleted negation of if statements from void methods
Issue-ID: SO-2634
Signed-off-by: marcinrzepeckiwroc <marcin.rzepecki@nokia.com>
Change-Id: I0bb46be8b2d648d721c58008ee133b63b77894d5
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/test/java')
-rw-r--r-- | bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java index 458919c48e..9e9c6f365f 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java @@ -815,6 +815,26 @@ public class BBInputSetupTest { assertThat(actual, sameBeanAs(expected)); } + @Test + public void testGetServiceInstanceHelperCreateScenarioExistingWithName() throws Exception { + RequestDetails requestDetails = new RequestDetails(); + RequestInfo requestInfo = new RequestInfo(); + requestDetails.setRequestInfo(requestInfo); + ServiceSubscription serviceSub = new ServiceSubscription(); + Customer customer = new Customer(); + customer.setServiceSubscription(serviceSub); + ServiceInstance expected = new ServiceInstance(); + expected.setServiceInstanceId("serviceInstanceId"); + org.onap.aai.domain.yang.ServiceInstance serviceInstanceAAI = new org.onap.aai.domain.yang.ServiceInstance(); + serviceInstanceAAI.setServiceInstanceId("serviceInstanceId"); + + doReturn(serviceInstanceAAI).when(SPY_bbInputSetupUtils).getAAIServiceInstanceByIdAndCustomer(Mockito.any(), + Mockito.any(), Mockito.any()); + ServiceInstance actual = SPY_bbInputSetup.getServiceInstanceHelper(requestDetails, customer, null, null, + new HashMap<>(), "SharansInstanceId", false, new Service(), "ActivateServiceInstanceBB"); + assertThat(actual, sameBeanAs(expected)); + } + @Test(expected = Exception.class) public void testGetServiceInstanceHelperCreateScenarioExistingNoNameButWithIdExceptionThrown() throws Exception { RequestDetails requestDetails = new RequestDetails(); |