diff options
Diffstat (limited to 'bpmn')
4 files changed, 47 insertions, 13 deletions
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/BaseTaskTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/BaseTaskTest.java index 49f373c01e..a9f33f20c5 100644 --- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/BaseTaskTest.java +++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/BaseTaskTest.java @@ -38,9 +38,9 @@ public class BaseTaskTest { private String anyValueString = "anyValue"; private String badValueString = "123abc"; private int anyValueInt = 123; - private Integer anyValueInteger = new Integer(anyValueInt); + private Integer anyValueInteger = Integer.valueOf(anyValueInt); private long anyValuelong = 123L; - private Long anyValueLong = new Long(anyValuelong); + private Long anyValueLong = Long.valueOf(anyValuelong); private DelegateExecution mockExecution; private Expression mockExpression; @@ -113,7 +113,7 @@ public class BaseTaskTest { assertEquals(anyValueString, obj1.toString()); expectedException.expect(MissingInjectedFieldException.class); - Object objectBoolean = new Boolean(true); // bad data + Object objectBoolean = Boolean.valueOf(true); // bad data when(mockExpression.getValue(mockExecution)).thenReturn(objectBoolean); obj2 = baseTask.getStringField(null, mockExecution, anyVariable); } @@ -134,7 +134,7 @@ public class BaseTaskTest { @Test public void testGetIntegerFieldAndMissingInjectedFieldException() throws Exception { - objectInteger = new Integer(anyValueInt); + objectInteger = Integer.valueOf(anyValueInt); when(mockExpression.getValue(mockExecution)).thenReturn(objectInteger); obj1 = baseTask.getIntegerField(mockExpression, mockExecution, anyVariable); assertEquals(anyValueInteger, (Integer) obj1); @@ -154,7 +154,7 @@ public class BaseTaskTest { @Test public void testGetOptionalIntegerField() throws Exception { - objectInteger = new Integer(anyValueInt); + objectInteger = Integer.valueOf(anyValueInt); when(mockExpression.getValue(mockExecution)).thenReturn(objectInteger); obj1 = baseTask.getOptionalIntegerField(mockExpression, mockExecution, anyVariable); assertEquals(anyValueInteger, (Integer) obj1); @@ -163,14 +163,14 @@ public class BaseTaskTest { @Test public void testGetOptionalIntegerFieldAndBadInjectedFieldException() throws Exception { expectedException.expect(BadInjectedFieldException.class); - objectBoolean = new Boolean(true); + objectBoolean = Boolean.valueOf(true); when(mockExpression.getValue(mockExecution)).thenReturn(objectBoolean); obj1 = baseTask.getOptionalIntegerField(mockExpression, mockExecution, anyVariable); } @Test public void testGetLongFieldAndMissingInjectedFieldException() throws Exception { - objectLong = new Long(anyValuelong); + objectLong = Long.valueOf(anyValuelong); when(mockExpression.getValue(mockExecution)).thenReturn(objectLong); obj1 = baseTask.getLongField(mockExpression, mockExecution, anyVariable); assertEquals(anyValueLong, (Long) obj1); @@ -189,7 +189,7 @@ public class BaseTaskTest { @Test public void testGetOptionalLongField() throws Exception { - objectLong = new Long(anyValuelong); + objectLong = Long.valueOf(anyValuelong); when(mockExpression.getValue(mockExecution)).thenReturn(objectLong); obj1 = baseTask.getOptionalLongField(mockExpression, mockExecution, anyVariable); assertEquals(anyValueLong, (Long) obj1); @@ -198,7 +198,7 @@ public class BaseTaskTest { @Test public void testGetOptionalLongFieldAndBadInjectedFieldException() throws Exception { expectedException.expect(BadInjectedFieldException.class); - objectBoolean = new Boolean(true); + objectBoolean = Boolean.valueOf(true); when(mockExpression.getValue(mockExecution)).thenReturn(objectBoolean); obj1 = baseTask.getOptionalLongField(mockExpression, mockExecution, anyVariable); } @@ -233,7 +233,7 @@ public class BaseTaskTest { @Test public void testGetOptionalOutputFieldAndBadInjectedFieldException() throws Exception { expectedException.expect(BadInjectedFieldException.class); - objectBoolean = new Boolean(true); + objectBoolean = Boolean.valueOf(true); when(mockExpression.getValue(mockExecution)).thenReturn(objectBoolean); obj1 = baseTask.getOptionalOutputField(mockExpression, mockExecution, anyVariable); } diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingTestIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingTestIT.java index 39a8995607..f3527fad7d 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingTestIT.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingTestIT.java @@ -60,7 +60,6 @@ public class OofHomingTestIT extends BaseIntegrationTest { Logger logger = LoggerFactory.getLogger(CreateAAIVfModuleIT.class); ServiceDecomposition serviceDecomposition = new ServiceDecomposition(); - String subscriber = ""; String subscriber2 = ""; private final CallbackSet callbacks = new CallbackSet(); @@ -208,8 +207,6 @@ public class OofHomingTestIT extends BaseIntegrationTest { serviceDecomposition.setServiceInstance(si); // Subscriber - subscriber = - "{\"globalSubscriberId\": \"SUB12_0322_DS_1201\",\"subscriberCommonSiteId\": \"DALTX0101\",\"subscriberName\": \"SUB_12_0322_DS_1201\"}"; subscriber2 = "{\"globalSubscriberId\": \"SUB12_0322_DS_1201\",\"subscriberName\": \"SUB_12_0322_DS_1201\"}"; } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java index b257e91165..9396f9dbfc 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java @@ -59,6 +59,12 @@ public class VnfAdapterCreateTasks { @Autowired private ExceptionBuilder exceptionUtil; + /** + * This method is used for creating the request for the VolumeGroup. + * + * @param execution + * @return + */ public void createVolumeGroupRequest(BuildingBlockExecution execution) { try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); @@ -93,6 +99,12 @@ public class VnfAdapterCreateTasks { } + /** + * This method is used for creating the request for the VfModule. + * + * @param execution + * @return + */ public void createVfModule(BuildingBlockExecution execution) { try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java index ab2647a68d..1dcdfa912c 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java @@ -52,6 +52,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.env.Environment; import org.springframework.stereotype.Component; +/* + * This class is used for creating the service instance, assigning vnf, assigning the Vfmodule & assigning the L3Network + * on SDNC. + */ @Component public class SDNCAssignTasks extends AbstractSDNCTask { private static final Logger logger = LoggerFactory.getLogger(SDNCAssignTasks.class); @@ -71,6 +75,13 @@ public class SDNCAssignTasks extends AbstractSDNCTask { @Autowired private Environment env; + /** + * BPMN access method to assigning the service instance in SDNC. + * + * It will assign the service instance by the service instance id. + * + * @param execution + */ public void assignServiceInstance(BuildingBlockExecution execution) { try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); @@ -89,6 +100,13 @@ public class SDNCAssignTasks extends AbstractSDNCTask { } } + /** + * BPMN access method to assigning the vnf in SDNC. + * + * It will assign the vnf according to the service instance id and vnf id. + * + * @param execution + */ public void assignVnf(BuildingBlockExecution execution) { try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); @@ -111,6 +129,13 @@ public class SDNCAssignTasks extends AbstractSDNCTask { } } + /** + * BPMN access method to assigning the vfModule in SDNC. + * + * It will assign the VfModule by the service instance id ,Vnf id and module id. + * + * @param execution + */ public void assignVfModule(BuildingBlockExecution execution) { try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); |