diff options
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/test')
18 files changed, 505 insertions, 58 deletions
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/AllottedResourceUtilsTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/AllottedResourceUtilsTest.groovy index 3da126f7a9..97db9775c9 100644 --- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/AllottedResourceUtilsTest.groovy +++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/AllottedResourceUtilsTest.groovy @@ -34,9 +34,9 @@ import org.onap.so.client.aai.entities.uri.AAIUriFactory import javax.ws.rs.core.UriBuilder import static org.junit.Assert.assertEquals import static org.junit.Assert.assertTrue -import static org.mockito.Matchers.any -import static org.mockito.Matchers.anyObject -import static org.mockito.Matchers.isA +import static org.mockito.ArgumentMatchers.any +import static org.mockito.ArgumentMatchers.anyObject +import static org.mockito.ArgumentMatchers.isA import static org.mockito.Mockito.atLeastOnce import static org.mockito.Mockito.doNothing import static org.mockito.Mockito.doThrow diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcessTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcessTest.groovy index 70068c849b..99c351c465 100644 --- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcessTest.groovy +++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcessTest.groovy @@ -33,7 +33,7 @@ import org.onap.so.bpmn.core.WorkflowException import static org.assertj.core.api.Assertions.assertThat import static org.assertj.core.api.Assertions.assertThatThrownBy -import static org.mockito.Matchers.eq +import static org.mockito.ArgumentMatchers.eq import static org.mockito.Mockito.* @RunWith(MockitoJUnitRunner.class) diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleTest.groovy index 55f68f665e..dac038fab3 100644 --- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleTest.groovy +++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleTest.groovy @@ -97,7 +97,7 @@ class CreateAAIVfModuleTest extends MsoGroovyTest{ @Test void testCreateGenericVnf(){ when(mockExecution.getVariable("CAAIVfMod_vnfName")).thenReturn("vnfName") - Mockito.doNothing().when(client).create(any(AAIResourceUri.class),anyObject()) + Mockito.doNothing().when(client).create(any(AAIResourceUri.class) as AAIResourceUri,anyObject()) createAAIVfModule.createGenericVnf(mockExecution) Mockito.verify(mockExecution).setVariable("CAAIVfMod_createGenericVnfResponseCode", 201) Mockito.verify(mockExecution).setVariable("CAAIVfMod_createGenericVnfResponse","Vnf Created") @@ -112,7 +112,7 @@ class CreateAAIVfModuleTest extends MsoGroovyTest{ when(mockExecution.getVariable("CAAIVfMod_personaId")).thenReturn("model1") when(mockExecution.getVariable("CAAIVfMod_moduleName")).thenReturn("vfModuleName") - Mockito.doNothing().when(client).create(any(AAIResourceUri.class),anyObject()) + Mockito.doNothing().when(client).create(any(AAIResourceUri.class) as AAIResourceUri,anyObject()) createAAIVfModule.createVfModule(mockExecution,false) Mockito.verify(mockExecution).setVariable("CAAIVfMod_createVfModuleResponseCode", 201) Mockito.verify(mockExecution).setVariable("CAAIVfMod_createVfModuleResponse","Vf Module Created") @@ -173,7 +173,7 @@ class CreateAAIVfModuleTest extends MsoGroovyTest{ Optional<GenericVnf> genericVnf = getAAIObjectFromJson(GenericVnf.class,"__files/aai/GenericVnfVfModule.json"); when(mockExecution.getVariable("CAAIVfMod_queryGenericVnfResponse")).thenReturn(genericVnf.get()) when(mockExecution.getVariable("CAAIVfMod_moduleName")).thenReturn("vfModuleName") - Mockito.doNothing().when(client).create(any(AAIResourceUri.class),anyObject()) + Mockito.doNothing().when(client).create(any(AAIResourceUri.class) as AAIResourceUri,anyObject()) createAAIVfModule.createVfModule(mockExecution,true) Mockito.verify(mockExecution).setVariable("CAAIVfMod_createVfModuleResponseCode", 201) Mockito.verify(mockExecution).setVariable("CAAIVfMod_createVfModuleResponse","Vf Module Created") diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/DeleteAAIVfModuleTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/DeleteAAIVfModuleTest.groovy index 4b6f8aa918..2a872511e7 100644 --- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/DeleteAAIVfModuleTest.groovy +++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/DeleteAAIVfModuleTest.groovy @@ -92,7 +92,7 @@ class DeleteAAIVfModuleTest extends MsoGroovyTest{ void testDeleteGenericVnf() { ExecutionEntity mockExecution = setupMock() when(mockExecution.getVariable("DAAIVfMod_vnfId")).thenReturn("vnfId1") - doNothing().when(client).delete(isA(AAIResourceUri.class)) + doNothing().when(client).delete(isA(AAIResourceUri.class) as AAIResourceUri) deleteAAIVfModule.deleteGenericVnf(mockExecution) Mockito.verify(mockExecution).setVariable(prefix + "deleteGenericVnfResponseCode", 200) } @@ -169,7 +169,7 @@ class DeleteAAIVfModuleTest extends MsoGroovyTest{ ExecutionEntity mockExecution = setupMock() when(mockExecution.getVariable("DAAIVfMod_vnfId")).thenReturn("vnfId1") try { - doThrow(new NotFoundException("Vnf Not Found")).when(client).delete(isA(AAIResourceUri.class)) + doThrow(new NotFoundException("Vnf Not Found")).when(client).delete(isA(AAIResourceUri.class) as AAIResourceUri) deleteAAIVfModule.deleteGenericVnf(mockExecution) } catch (Exception ex) { println " Test End - Handle catch-throw BpmnError()! " @@ -186,7 +186,7 @@ class DeleteAAIVfModuleTest extends MsoGroovyTest{ ExecutionEntity mockExecution = setupMock() when(mockExecution.getVariable("DAAIVfMod_vnfId")).thenReturn("vnfId1") when(mockExecution.getVariable("DAAIVfMod_vfModuleId")).thenReturn("vfModuleId1") - doNothing().when(client).delete(isA(AAIResourceUri.class)) + doNothing().when(client).delete(isA(AAIResourceUri.class) as AAIResourceUri) deleteAAIVfModule.deleteVfModule(mockExecution) Mockito.verify(mockExecution).setVariable(prefix + "deleteVfModuleResponseCode", 200) } @@ -197,7 +197,7 @@ class DeleteAAIVfModuleTest extends MsoGroovyTest{ when(mockExecution.getVariable("DAAIVfMod_vnfId")).thenReturn("vnfId1") when(mockExecution.getVariable("DAAIVfMod_vfModuleId")).thenReturn("vfModuleId1") try { - doThrow(new NotFoundException("Vnf Not Found")).when(client).delete(isA(AAIResourceUri.class)) + doThrow(new NotFoundException("Vnf Not Found")).when(client).delete(isA(AAIResourceUri.class) as AAIResourceUri) deleteAAIVfModule.deleteVfModule(mockExecution) } catch (Exception ex) { println " Test End - Handle catch-throw BpmnError()! " diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/MsoUtilsTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/MsoUtilsTest.groovy index dfaf5d2140..c6a68c0e7a 100644 --- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/MsoUtilsTest.groovy +++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/MsoUtilsTest.groovy @@ -277,5 +277,13 @@ class MsoUtilsTest { } } - + @Test + public void testGetLowestUnusedIndex() { + def responseAsString = getFile("vfModuleCount.xml") + def index = utils.getLowestUnusedIndex(responseAsString) + println " lowest module count test: " + println " actual - " + index + println " expected - " + "14" + assertEquals("expected vs actual", "14", index) + } }
\ No newline at end of file diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnfTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnfTest.groovy index 5641c5e12f..2bd5181c31 100644 --- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnfTest.groovy +++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnfTest.groovy @@ -40,8 +40,8 @@ import org.onap.so.bpmn.mock.FileUtil import org.onap.so.bpmn.mock.StubResponseAAI import static com.github.tomakehurst.wiremock.client.WireMock.* -import static org.mockito.Matchers.any -import static org.mockito.Matchers.refEq +import static org.mockito.ArgumentMatchers.any +import static org.mockito.ArgumentMatchers.refEq import static org.mockito.Mockito.* @RunWith(MockitoJUnitRunner.class) diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModuleTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModuleTest.groovy index 2d2f58b415..72bcfcf359 100644 --- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModuleTest.groovy +++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModuleTest.groovy @@ -111,7 +111,7 @@ class UpdateAAIVfModuleTest extends MsoGroovyTest { vfModule.setVfModuleId("supercool") vfModule.setResourceVersion("12345") when(mockExecution.getVariable(prefix + "getVfModuleResponse")).thenReturn(vfModule) - doNothing().when(client).update(isA(AAIResourceUri.class), anyObject()) + doNothing().when(client).update(isA(AAIResourceUri.class) as AAIResourceUri, anyObject()) updateAAIVfModule.updateVfModule(mockExecution) verify(mockExecution).setVariable("UAAIVfMod_updateVfModuleResponseCode", 200) } @@ -126,7 +126,7 @@ class UpdateAAIVfModuleTest extends MsoGroovyTest { vfModule.setVfModuleId("supercool") vfModule.setResourceVersion("12345") when(mockExecution.getVariable(prefix + "getVfModuleResponse")).thenReturn(vfModule) - doThrow(new NotFoundException("Vf Module not found")).when(client).update(isA(AAIResourceUri.class), anyObject()) + doThrow(new NotFoundException("Vf Module not found")).when(client).update(isA(AAIResourceUri.class) as AAIResourceUri, anyObject()) thrown.expect(BpmnError.class) updateAAIVfModule.updateVfModule(mockExecution) verify(mockExecution).setVariable("UAAIVfMod_updateVfModuleResponseCode", 404) @@ -143,7 +143,7 @@ class UpdateAAIVfModuleTest extends MsoGroovyTest { vfModule.setVfModuleId("supercool") vfModule.setResourceVersion("12345") when(mockExecution.getVariable(prefix + "getVfModuleResponse")).thenReturn(vfModule) - doThrow(new IllegalStateException("Error in AAI client")).when(client).update(isA(AAIResourceUri.class), anyObject()) + doThrow(new IllegalStateException("Error in AAI client")).when(client).update(isA(AAIResourceUri.class) as AAIResourceUri, anyObject()) thrown.expect(BpmnError.class) updateAAIVfModule.updateVfModule(mockExecution) verify(mockExecution).setVariable("UAAIVfMod_updateVfModuleResponseCode", 500) diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/DelegateExecutionImplTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/DelegateExecutionImplTest.java index cf74356fa2..32a18d5a7a 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/DelegateExecutionImplTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/DelegateExecutionImplTest.java @@ -25,7 +25,7 @@ import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThat; -import static org.mockito.Matchers.contains; +import static org.mockito.ArgumentMatchers.contains; import static org.mockito.Mockito.mock; import java.io.Serializable; diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilderTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilderTest.java index 5598e3d2e4..e5e13268b2 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilderTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilderTest.java @@ -19,24 +19,390 @@ */ package org.onap.so.bpmn.common.resource; -import org.junit.Test; +import static org.junit.Assert.assertEquals; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.junit.Rule; +import org.junit.Test; +import org.mockito.Mock; +import org.onap.so.BaseTest; +import org.onap.so.bpmn.core.UrnPropertiesReader; +import org.springframework.core.env.Environment; + +import static com.github.tomakehurst.wiremock.client.WireMock.*; + -public class ResourceRequestBuilderTest { +public class ResourceRequestBuilderTest extends BaseTest { @Test - public void buildResouceRequestTest() throws Exception { + public void getResourceInputTest() throws Exception { - ResourceRequestBuilder.buildResouceRequest("xxxxxx", - "a1074969-944f-4ddc-b687-9550b0c8cd57", new HashMap<>()); + + + stubFor(get(urlEqualTo("/ecomp/mso/catalog/v2/serviceResources?serviceModelUuid=c3954379-4efe-431c-8258-f84905b158e5")) + .willReturn(ok("{ \"serviceResources\" : {\n" + + "\t\"modelInfo\" : {\n" + + "\t\t\"modelName\" : \"demoVFWCL\",\n" + + "\t\t\"modelUuid\" : \"c3954379-4efe-431c-8258-f84905b158e5\",\n" + + "\t\t\"modelInvariantUuid\" : \"0cbff61e-3b0a-4eed-97ce-b1b4faa03493\",\n" + + "\t\t\"modelVersion\" : \"1.0\"\n" + + "\t},\n" + + "\t\"serviceType\" : \"\",\n" + + "\t\"serviceRole\" : \"\",\n" + + "\t\"environmentContext\" : null,\n" + + "\t\"resourceOrder\" : \"res1,res2\",\n" + + "\t\"workloadContext\" : \"Production\",\n" + + "\t\"serviceVnfs\": [\n" + + "\t\n" + + "\t\t{ \"modelInfo\" : {\n" + + "\t\t\t\"modelName\" : \"15968a6e-2fe5-41bf-a481\",\n" + + "\t\t\t\"modelUuid\" : \"808abda3-2023-4105-92d2-e62644b61d53\",\n" + + "\t\t\t\"modelInvariantUuid\" : \"6e4ffc7c-497e-4a77-970d-af966e642d31\",\n" + + "\t\t\t\"modelVersion\" : \"1.0\",\n" + + "\t\t\t\"modelCustomizationUuid\" : \"a00404d5-d7eb-4c46-b6b6-9cf2d087e545\",\n" + + "\t\t\t\"modelInstanceName\" : \"15968a6e-2fe5-41bf-a481 0\"\n" + + "\t\t\t},\n" + + "\t\t\"toscaNodeType\" : \"org.openecomp.resource.vf.15968a6e2fe541bfA481\",\n" + + "\t\t\"nfFunction\" \t: null,\n" + + "\"resourceInput\":\"{\\\"a\\\":\\\"b\\\"}\"," + + "\t\t\"nfType\" \t\t: null,\n" + + "\t\t\"nfRole\" \t\t: null,\n" + + "\t\t\"nfNamingCode\" \t: null,\n" + + "\t\t\"multiStageDesign\" : \"false\",\n" + + "\t\t\t\"vfModules\": [\n" + + "\t\t\t\t{\n" + + "\t\t\t\t\t\"modelInfo\" : { \n" + + "\t\t\t\t\t\t\"modelName\" : \"15968a6e2fe541bfA481..base_vfw..module-0\",\n" + + "\t\t\t\t\t\t\"modelUuid\" : \"ec7fadde-1e5a-42f7-8255-cb19e475ff45\",\n" + + "\t\t\t\t\t\t\"modelInvariantUuid\" : \"61ab8b64-a014-4cf3-8a5a-b5ef388f8819\",\n" + + "\t\t\t\t\t\t\"modelVersion\" : \"1\",\n" + + "\t\t\t\t\t\t\"modelCustomizationUuid\" : \"123aff6b-854f-4026-ae1e-cc74a3924576\"\n" + + "\t\t\t\t\t},\t\t\"isBase\" : true,\n" + + "\t\t\t\t\t\"vfModuleLabel\" : \"base_vfw\",\n" + + "\t\t\t\t\t\"initialCount\" : 1,\n" + + "\t\t\t\t\t\"hasVolumeGroup\" : true\n" + + "\t\t\t\t}\n" + + "\t\t\t]\n" + + "\t\t},\n" + + "\t\n" + + "\t\t{ \"modelInfo\" : {\n" + + "\t\t\t\"modelName\" : \"f971106a-248f-4202-9d1f\",\n" + + "\t\t\t\"modelUuid\" : \"4fbc08a4-35ed-4a59-9e47-79975e4add7e\",\n" + + "\t\t\t\"modelInvariantUuid\" : \"c669799e-adf1-46ae-8c70-48b326fe89f3\",\n" + + "\t\t\t\"modelVersion\" : \"1.0\",\n" + + "\t\t\t\"modelCustomizationUuid\" : \"e776449e-2b10-45c5-9217-2775c88ca1a0\",\n" + + "\t\t\t\"modelInstanceName\" : \"f971106a-248f-4202-9d1f 0\"\n" + + "\t\t\t},\n" + + "\t\t\"toscaNodeType\" : \"org.openecomp.resource.vf.F971106a248f42029d1f\",\n" + + "\t\t\"nfFunction\" \t: null,\n" + + "\t\t\"nfType\" \t\t: null,\n" + + "\t\t\"nfRole\" \t\t: null,\n" + + "\"resourceInput\":\"{\\\"a\\\":\\\"key|default_value\\\"}\"," + + "\t\t\"nfNamingCode\" \t: null,\n" + + "\t\t\"multiStageDesign\" : \"false\",\n" + + "\t\t\t\"vfModules\": [\n" + + "\t\t\t\t{\n" + + "\t\t\t\t\t\"modelInfo\" : { \n" + + "\t\t\t\t\t\t\"modelName\" : \"F971106a248f42029d1f..base_vpkg..module-0\",\n" + + "\t\t\t\t\t\t\"modelUuid\" : \"47d5273a-7456-4786-9035-b3911944cc35\",\n" + + "\t\t\t\t\t\t\"modelInvariantUuid\" : \"0ea3e57e-ac7a-425a-928b-b4aee8806c15\",\n" + + "\t\t\t\t\t\t\"modelVersion\" : \"1\",\n" + + "\t\t\t\t\t\t\"modelCustomizationUuid\" : \"9ed9fef6-d3f8-4433-9807-7e23393a16bc\"\n" + + "\t\t\t\t\t},\t\t\"isBase\" : true,\n" + + "\t\t\t\t\t\"vfModuleLabel\" : \"base_vpkg\",\n" + + "\t\t\t\t\t\"initialCount\" : 1,\n" + + "\t\t\t\t\t\"hasVolumeGroup\" : true\n" + + "\t\t\t\t}\n" + + "\t\t\t]\n" + + "\t\t}\n" + + "\t],\n" + + "\t\"serviceNetworks\": [],\n" + + "\t\"serviceAllottedResources\": []\n" + + "\t}}"))); + +// when(UrnPropertiesReader.getVariable(anyString())).thenReturn("http://localhost:8080"); + HashMap serviceInput = new HashMap(); + serviceInput.put("key", "value"); + Map<String, Object> stringObjectMap = ResourceRequestBuilder.buildResouceRequest("c3954379-4efe-431c-8258-f84905b158e5", + "e776449e-2b10-45c5-9217-2775c88ca1a0", serviceInput); + assertEquals(stringObjectMap.get("a"), "value"); } @Test - public void buildResouceRequestParametersTest() throws Exception { + public void getResourceInputDefaultValueTest() throws Exception { + + stubFor(get(urlEqualTo("/ecomp/mso/catalog/v2/serviceResources?serviceModelUuid=c3954379-4efe-431c-8258-f84905b158e5")) + .willReturn(ok("{ \"serviceResources\" : {\n" + + "\t\"modelInfo\" : {\n" + + "\t\t\"modelName\" : \"demoVFWCL\",\n" + + "\t\t\"modelUuid\" : \"c3954379-4efe-431c-8258-f84905b158e5\",\n" + + "\t\t\"modelInvariantUuid\" : \"0cbff61e-3b0a-4eed-97ce-b1b4faa03493\",\n" + + "\t\t\"modelVersion\" : \"1.0\"\n" + + "\t},\n" + + "\t\"serviceType\" : \"\",\n" + + "\t\"serviceRole\" : \"\",\n" + + "\t\"environmentContext\" : null,\n" + + "\t\"workloadContext\" : \"Production\",\n" + + "\t\"serviceVnfs\": [\n" + + "\t\n" + + "\t\t{ \"modelInfo\" : {\n" + + "\t\t\t\"modelName\" : \"15968a6e-2fe5-41bf-a481\",\n" + + "\t\t\t\"modelUuid\" : \"808abda3-2023-4105-92d2-e62644b61d53\",\n" + + "\t\t\t\"modelInvariantUuid\" : \"6e4ffc7c-497e-4a77-970d-af966e642d31\",\n" + + "\t\t\t\"modelVersion\" : \"1.0\",\n" + + "\t\t\t\"modelCustomizationUuid\" : \"a00404d5-d7eb-4c46-b6b6-9cf2d087e545\",\n" + + "\t\t\t\"modelInstanceName\" : \"15968a6e-2fe5-41bf-a481 0\"\n" + + "\t\t\t},\n" + + "\t\t\"toscaNodeType\" : \"org.openecomp.resource.vf.15968a6e2fe541bfA481\",\n" + + "\t\t\"nfFunction\" \t: null,\n" + + "\"resourceInput\":\"{\\\"a\\\":\\\"b\\\"}\"," + + "\t\t\"nfType\" \t\t: null,\n" + + "\t\t\"nfRole\" \t\t: null,\n" + + "\t\t\"nfNamingCode\" \t: null,\n" + + "\t\t\"multiStageDesign\" : \"false\",\n" + + "\t\t\t\"vfModules\": [\n" + + "\t\t\t\t{\n" + + "\t\t\t\t\t\"modelInfo\" : { \n" + + "\t\t\t\t\t\t\"modelName\" : \"15968a6e2fe541bfA481..base_vfw..module-0\",\n" + + "\t\t\t\t\t\t\"modelUuid\" : \"ec7fadde-1e5a-42f7-8255-cb19e475ff45\",\n" + + "\t\t\t\t\t\t\"modelInvariantUuid\" : \"61ab8b64-a014-4cf3-8a5a-b5ef388f8819\",\n" + + "\t\t\t\t\t\t\"modelVersion\" : \"1\",\n" + + "\t\t\t\t\t\t\"modelCustomizationUuid\" : \"123aff6b-854f-4026-ae1e-cc74a3924576\"\n" + + "\t\t\t\t\t},\t\t\"isBase\" : true,\n" + + "\t\t\t\t\t\"vfModuleLabel\" : \"base_vfw\",\n" + + "\t\t\t\t\t\"initialCount\" : 1,\n" + + "\t\t\t\t\t\"hasVolumeGroup\" : true\n" + + "\t\t\t\t}\n" + + "\t\t\t]\n" + + "\t\t},\n" + + "\t\n" + + "\t\t{ \"modelInfo\" : {\n" + + "\t\t\t\"modelName\" : \"f971106a-248f-4202-9d1f\",\n" + + "\t\t\t\"modelUuid\" : \"4fbc08a4-35ed-4a59-9e47-79975e4add7e\",\n" + + "\t\t\t\"modelInvariantUuid\" : \"c669799e-adf1-46ae-8c70-48b326fe89f3\",\n" + + "\t\t\t\"modelVersion\" : \"1.0\",\n" + + "\t\t\t\"modelCustomizationUuid\" : \"e776449e-2b10-45c5-9217-2775c88ca1a0\",\n" + + "\t\t\t\"modelInstanceName\" : \"f971106a-248f-4202-9d1f 0\"\n" + + "\t\t\t},\n" + + "\t\t\"toscaNodeType\" : \"org.openecomp.resource.vf.F971106a248f42029d1f\",\n" + + "\t\t\"nfFunction\" \t: null,\n" + + "\t\t\"nfType\" \t\t: null,\n" + + "\t\t\"nfRole\" \t\t: null,\n" + + "\"resourceInput\":\"{\\\"a\\\":\\\"key|default_value\\\"}\"," + + "\t\t\"nfNamingCode\" \t: null,\n" + + "\t\t\"multiStageDesign\" : \"false\",\n" + + "\t\t\t\"vfModules\": [\n" + + "\t\t\t\t{\n" + + "\t\t\t\t\t\"modelInfo\" : { \n" + + "\t\t\t\t\t\t\"modelName\" : \"F971106a248f42029d1f..base_vpkg..module-0\",\n" + + "\t\t\t\t\t\t\"modelUuid\" : \"47d5273a-7456-4786-9035-b3911944cc35\",\n" + + "\t\t\t\t\t\t\"modelInvariantUuid\" : \"0ea3e57e-ac7a-425a-928b-b4aee8806c15\",\n" + + "\t\t\t\t\t\t\"modelVersion\" : \"1\",\n" + + "\t\t\t\t\t\t\"modelCustomizationUuid\" : \"9ed9fef6-d3f8-4433-9807-7e23393a16bc\"\n" + + "\t\t\t\t\t},\t\t\"isBase\" : true,\n" + + "\t\t\t\t\t\"vfModuleLabel\" : \"base_vpkg\",\n" + + "\t\t\t\t\t\"initialCount\" : 1,\n" + + "\t\t\t\t\t\"hasVolumeGroup\" : true\n" + + "\t\t\t\t}\n" + + "\t\t\t]\n" + + "\t\t}\n" + + "\t],\n" + + "\t\"serviceNetworks\": [],\n" + + "\t\"serviceAllottedResources\": []\n" + + "\t}}"))); + +// when(UrnPropertiesReader.getVariable(anyString())).thenReturn("http://localhost:8080"); + HashMap serviceInput = new HashMap(); + serviceInput.put("key1", "value"); + Map<String, Object> stringObjectMap = ResourceRequestBuilder.buildResouceRequest("c3954379-4efe-431c-8258-f84905b158e5", + "e776449e-2b10-45c5-9217-2775c88ca1a0", serviceInput); + assertEquals(stringObjectMap.get("a"), "default_value"); + } + + @Test + public void getResourceInputValueNoDefaultTest() throws Exception { + + stubFor(get(urlEqualTo("/ecomp/mso/catalog/v2/serviceResources?serviceModelUuid=c3954379-4efe-431c-8258-f84905b158e5")) + .willReturn(ok("{ \"serviceResources\" : {\n" + + "\t\"modelInfo\" : {\n" + + "\t\t\"modelName\" : \"demoVFWCL\",\n" + + "\t\t\"modelUuid\" : \"c3954379-4efe-431c-8258-f84905b158e5\",\n" + + "\t\t\"modelInvariantUuid\" : \"0cbff61e-3b0a-4eed-97ce-b1b4faa03493\",\n" + + "\t\t\"modelVersion\" : \"1.0\"\n" + + "\t},\n" + + "\t\"serviceType\" : \"\",\n" + + "\t\"serviceRole\" : \"\",\n" + + "\t\"environmentContext\" : null,\n" + + "\t\"workloadContext\" : \"Production\",\n" + + "\t\"serviceVnfs\": [\n" + + "\t\n" + + "\t\t{ \"modelInfo\" : {\n" + + "\t\t\t\"modelName\" : \"15968a6e-2fe5-41bf-a481\",\n" + + "\t\t\t\"modelUuid\" : \"808abda3-2023-4105-92d2-e62644b61d53\",\n" + + "\t\t\t\"modelInvariantUuid\" : \"6e4ffc7c-497e-4a77-970d-af966e642d31\",\n" + + "\t\t\t\"modelVersion\" : \"1.0\",\n" + + "\t\t\t\"modelCustomizationUuid\" : \"a00404d5-d7eb-4c46-b6b6-9cf2d087e545\",\n" + + "\t\t\t\"modelInstanceName\" : \"15968a6e-2fe5-41bf-a481 0\"\n" + + "\t\t\t},\n" + + "\t\t\"toscaNodeType\" : \"org.openecomp.resource.vf.15968a6e2fe541bfA481\",\n" + + "\t\t\"nfFunction\" \t: null,\n" + + "\"resourceInput\":\"{\\\"a\\\":\\\"b\\\"}\"," + + "\t\t\"nfType\" \t\t: null,\n" + + "\t\t\"nfRole\" \t\t: null,\n" + + "\t\t\"nfNamingCode\" \t: null,\n" + + "\t\t\"multiStageDesign\" : \"false\",\n" + + "\t\t\t\"vfModules\": [\n" + + "\t\t\t\t{\n" + + "\t\t\t\t\t\"modelInfo\" : { \n" + + "\t\t\t\t\t\t\"modelName\" : \"15968a6e2fe541bfA481..base_vfw..module-0\",\n" + + "\t\t\t\t\t\t\"modelUuid\" : \"ec7fadde-1e5a-42f7-8255-cb19e475ff45\",\n" + + "\t\t\t\t\t\t\"modelInvariantUuid\" : \"61ab8b64-a014-4cf3-8a5a-b5ef388f8819\",\n" + + "\t\t\t\t\t\t\"modelVersion\" : \"1\",\n" + + "\t\t\t\t\t\t\"modelCustomizationUuid\" : \"123aff6b-854f-4026-ae1e-cc74a3924576\"\n" + + "\t\t\t\t\t},\t\t\"isBase\" : true,\n" + + "\t\t\t\t\t\"vfModuleLabel\" : \"base_vfw\",\n" + + "\t\t\t\t\t\"initialCount\" : 1,\n" + + "\t\t\t\t\t\"hasVolumeGroup\" : true\n" + + "\t\t\t\t}\n" + + "\t\t\t]\n" + + "\t\t},\n" + + "\t\n" + + "\t\t{ \"modelInfo\" : {\n" + + "\t\t\t\"modelName\" : \"f971106a-248f-4202-9d1f\",\n" + + "\t\t\t\"modelUuid\" : \"4fbc08a4-35ed-4a59-9e47-79975e4add7e\",\n" + + "\t\t\t\"modelInvariantUuid\" : \"c669799e-adf1-46ae-8c70-48b326fe89f3\",\n" + + "\t\t\t\"modelVersion\" : \"1.0\",\n" + + "\t\t\t\"modelCustomizationUuid\" : \"e776449e-2b10-45c5-9217-2775c88ca1a0\",\n" + + "\t\t\t\"modelInstanceName\" : \"f971106a-248f-4202-9d1f 0\"\n" + + "\t\t\t},\n" + + "\t\t\"toscaNodeType\" : \"org.openecomp.resource.vf.F971106a248f42029d1f\",\n" + + "\t\t\"nfFunction\" \t: null,\n" + + "\t\t\"nfType\" \t\t: null,\n" + + "\t\t\"nfRole\" \t\t: null,\n" + + "\"resourceInput\":\"{\\\"a\\\":\\\"value\\\"}\"," + + "\t\t\"nfNamingCode\" \t: null,\n" + + "\t\t\"multiStageDesign\" : \"false\",\n" + + "\t\t\t\"vfModules\": [\n" + + "\t\t\t\t{\n" + + "\t\t\t\t\t\"modelInfo\" : { \n" + + "\t\t\t\t\t\t\"modelName\" : \"F971106a248f42029d1f..base_vpkg..module-0\",\n" + + "\t\t\t\t\t\t\"modelUuid\" : \"47d5273a-7456-4786-9035-b3911944cc35\",\n" + + "\t\t\t\t\t\t\"modelInvariantUuid\" : \"0ea3e57e-ac7a-425a-928b-b4aee8806c15\",\n" + + "\t\t\t\t\t\t\"modelVersion\" : \"1\",\n" + + "\t\t\t\t\t\t\"modelCustomizationUuid\" : \"9ed9fef6-d3f8-4433-9807-7e23393a16bc\"\n" + + "\t\t\t\t\t},\t\t\"isBase\" : true,\n" + + "\t\t\t\t\t\"vfModuleLabel\" : \"base_vpkg\",\n" + + "\t\t\t\t\t\"initialCount\" : 1,\n" + + "\t\t\t\t\t\"hasVolumeGroup\" : true\n" + + "\t\t\t\t}\n" + + "\t\t\t]\n" + + "\t\t}\n" + + "\t],\n" + + "\t\"serviceNetworks\": [],\n" + + "\t\"serviceAllottedResources\": []\n" + + "\t}}"))); + +// when(UrnPropertiesReader.getVariable(anyString())).thenReturn("http://localhost:8080"); + HashMap serviceInput = new HashMap(); + serviceInput.put("key1", "value"); + Map<String, Object> stringObjectMap = ResourceRequestBuilder.buildResouceRequest("c3954379-4efe-431c-8258-f84905b158e5", + "e776449e-2b10-45c5-9217-2775c88ca1a0", serviceInput); + assertEquals(stringObjectMap.get("a"), "value"); + } + + @Test + public void getResourceSequenceTest() throws Exception { + + stubFor(get(urlEqualTo("/ecomp/mso/catalog/v2/serviceResources?serviceModelUuid=c3954379-4efe-431c-8258-f84905b158e5")) + .willReturn(ok("{ \"serviceResources\" : {\n" + + "\t\"modelInfo\" : {\n" + + "\t\t\"modelName\" : \"demoVFWCL\",\n" + + "\t\t\"modelUuid\" : \"c3954379-4efe-431c-8258-f84905b158e5\",\n" + + "\t\t\"modelInvariantUuid\" : \"0cbff61e-3b0a-4eed-97ce-b1b4faa03493\",\n" + + "\t\t\"modelVersion\" : \"1.0\"\n" + + "\t},\n" + + "\t\"serviceType\" : \"\",\n" + + "\t\"serviceRole\" : \"\",\n" + + "\t\"environmentContext\" : null,\n" + + "\t\"resourceOrder\" : \"res1,res2\",\n" + + "\t\"workloadContext\" : \"Production\",\n" + + "\t\"serviceVnfs\": [\n" + + "\t\n" + + "\t\t{ \"modelInfo\" : {\n" + + "\t\t\t\"modelName\" : \"15968a6e-2fe5-41bf-a481\",\n" + + "\t\t\t\"modelUuid\" : \"808abda3-2023-4105-92d2-e62644b61d53\",\n" + + "\t\t\t\"modelInvariantUuid\" : \"6e4ffc7c-497e-4a77-970d-af966e642d31\",\n" + + "\t\t\t\"modelVersion\" : \"1.0\",\n" + + "\t\t\t\"modelCustomizationUuid\" : \"a00404d5-d7eb-4c46-b6b6-9cf2d087e545\",\n" + + "\t\t\t\"modelInstanceName\" : \"15968a6e-2fe5-41bf-a481 0\"\n" + + "\t\t\t},\n" + + "\t\t\"toscaNodeType\" : \"org.openecomp.resource.vf.15968a6e2fe541bfA481\",\n" + + "\t\t\"nfFunction\" \t: null,\n" + + "\"resourceInput\":\"{\\\"a\\\":\\\"b\\\"}\"," + + "\t\t\"nfType\" \t\t: null,\n" + + "\t\t\"nfRole\" \t\t: null,\n" + + "\t\t\"nfNamingCode\" \t: null,\n" + + "\t\t\"multiStageDesign\" : \"false\",\n" + + "\t\t\t\"vfModules\": [\n" + + "\t\t\t\t{\n" + + "\t\t\t\t\t\"modelInfo\" : { \n" + + "\t\t\t\t\t\t\"modelName\" : \"15968a6e2fe541bfA481..base_vfw..module-0\",\n" + + "\t\t\t\t\t\t\"modelUuid\" : \"ec7fadde-1e5a-42f7-8255-cb19e475ff45\",\n" + + "\t\t\t\t\t\t\"modelInvariantUuid\" : \"61ab8b64-a014-4cf3-8a5a-b5ef388f8819\",\n" + + "\t\t\t\t\t\t\"modelVersion\" : \"1\",\n" + + "\t\t\t\t\t\t\"modelCustomizationUuid\" : \"123aff6b-854f-4026-ae1e-cc74a3924576\"\n" + + "\t\t\t\t\t},\t\t\"isBase\" : true,\n" + + "\t\t\t\t\t\"vfModuleLabel\" : \"base_vfw\",\n" + + "\t\t\t\t\t\"initialCount\" : 1,\n" + + "\t\t\t\t\t\"hasVolumeGroup\" : true\n" + + "\t\t\t\t}\n" + + "\t\t\t]\n" + + "\t\t},\n" + + "\t\n" + + "\t\t{ \"modelInfo\" : {\n" + + "\t\t\t\"modelName\" : \"f971106a-248f-4202-9d1f\",\n" + + "\t\t\t\"modelUuid\" : \"4fbc08a4-35ed-4a59-9e47-79975e4add7e\",\n" + + "\t\t\t\"modelInvariantUuid\" : \"c669799e-adf1-46ae-8c70-48b326fe89f3\",\n" + + "\t\t\t\"modelVersion\" : \"1.0\",\n" + + "\t\t\t\"modelCustomizationUuid\" : \"e776449e-2b10-45c5-9217-2775c88ca1a0\",\n" + + "\t\t\t\"modelInstanceName\" : \"f971106a-248f-4202-9d1f 0\"\n" + + "\t\t\t},\n" + + "\t\t\"toscaNodeType\" : \"org.openecomp.resource.vf.F971106a248f42029d1f\",\n" + + "\t\t\"nfFunction\" \t: null,\n" + + "\t\t\"nfType\" \t\t: null,\n" + + "\t\t\"nfRole\" \t\t: null,\n" + + "\"resourceInput\":\"{\\\"a\\\":\\\"key|default_value\\\"}\"," + + "\t\t\"nfNamingCode\" \t: null,\n" + + "\t\t\"multiStageDesign\" : \"false\",\n" + + "\t\t\t\"vfModules\": [\n" + + "\t\t\t\t{\n" + + "\t\t\t\t\t\"modelInfo\" : { \n" + + "\t\t\t\t\t\t\"modelName\" : \"F971106a248f42029d1f..base_vpkg..module-0\",\n" + + "\t\t\t\t\t\t\"modelUuid\" : \"47d5273a-7456-4786-9035-b3911944cc35\",\n" + + "\t\t\t\t\t\t\"modelInvariantUuid\" : \"0ea3e57e-ac7a-425a-928b-b4aee8806c15\",\n" + + "\t\t\t\t\t\t\"modelVersion\" : \"1\",\n" + + "\t\t\t\t\t\t\"modelCustomizationUuid\" : \"9ed9fef6-d3f8-4433-9807-7e23393a16bc\"\n" + + "\t\t\t\t\t},\t\t\"isBase\" : true,\n" + + "\t\t\t\t\t\"vfModuleLabel\" : \"base_vpkg\",\n" + + "\t\t\t\t\t\"initialCount\" : 1,\n" + + "\t\t\t\t\t\"hasVolumeGroup\" : true\n" + + "\t\t\t\t}\n" + + "\t\t\t]\n" + + "\t\t}\n" + + "\t],\n" + + "\t\"serviceNetworks\": [],\n" + + "\t\"serviceAllottedResources\": []\n" + + "\t}}"))); - String parameters = - "{ \"locationConstraints\":[ ], \"resources\":[ { \"resourceName\":\"vEPC_ONAP01\", \"resourceInvariantUuid\":\"36ebe421-283a-4ee8-92f1-d09e7c44b911\", \"resourceUuid\":\"27a0e235-b67a-4ea4-a0cf-25761afed111\", \"resourceCustomizationUuid\":\"27a0e235-b67a-4ea4-a0cf-25761afed231\", \"parameters\":{ \"locationConstraints\":[ { \"vnfProfileId\":\"b244d433-8c9c-49ad-9c70-8e34b8dc8328\", \"locationConstraints\":{ \"vimId\":\"vmware_vio\" } }, { \"vnfProfileId\":\"8a9f7c48-21ce-41b7-95b8-a8ac61ccb1ff\", \"locationConstraints\":{ \"vimId\":\"core-dc_RegionOne\" } } ], \"resources\":[ ], \"requestInputs\":{ \"sdncontroller\":\"\" } } }, { \"resourceName\":\"VL OVERLAYTUNNEL\", \"resourceInvariantUuid\":\"184494cf-472f-436f-82e2-d83dddde21cb\", \"resourceUuid\":\"95bc3e59-c9c5-458f-ad6e-78874ab4b3cc\", \"resourceCustomizationUuid\":\"27a0e235-b67a-4ea4-a0cf-25761afed232\", \"parameters\":{ \"locationConstraints\":[ ], \"resources\":[ ], \"requestInputs\":{ } } } ], \"requestInputs\":{ \"vlunderlayvpn0_name\":\"l3connect\", \"vlunderlayvpn0_site1_id\":\"IP-WAN-Controller-1\", \"vlunderlayvpn0_site2_id\":\"SPTNController\", \"vlunderlayvpn0_site1_networkName\":\"network1,network2\", \"vlunderlayvpn0_site2_networkName\":\"network3,network4\", \"vlunderlayvpn0_site1_routerId\":\"a8098c1a-f86e-11da-bd1a-00112444be1a\", \"vlunderlayvpn0_site2_routerId\":\"a8098c1a-f86e-11da-bd1a-00112444be1e\", \"vlunderlayvpn0_site2_importRT1\":\"200:1,200:2\", \"vlunderlayvpn0_site1_exportRT1\":\"300:1,300:2\", \"vlunderlayvpn0_site2_exportRT1\":\"400:1,400:2\", \"vlunderlayvpn0_site1_vni\":\"2000\", \"vlunderlayvpn0_site2_vni\":\"3000\", \"vlunderlayvpn0_tunnelType\":\"L3-DCI\" } }"; - ResourceRequestBuilder.buildResourceRequestParameters(null, "1bd0eae6-2dcc-4461-9ae6-56d641f369d6", "27a0e235-b67a-4ea4-a0cf-25761afed231", parameters); + List<String> resourceSequence = ResourceRequestBuilder.getResourceSequence("c3954379-4efe-431c-8258-f84905b158e5"); + assertEquals(resourceSequence.size(), 2); + assertEquals(resourceSequence.get(0), "res1"); + assertEquals(resourceSequence.get(1), "res2"); } }
\ No newline at end of file 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 78238f0271..56875d315b 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 @@ -26,7 +26,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Matchers.eq; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.ArgumentMatchers.isA; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.doReturn; @@ -47,7 +47,7 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentMatchers; -import org.mockito.Matchers; +import org.mockito.ArgumentMatchers; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.Spy; @@ -711,11 +711,12 @@ public class BBInputSetupTest { String instanceName = "instanceName"; String vnfType = "vnfType"; String resourceId = "networkId"; + String productFamilyId = "productFamilyId"; Service service = Mockito.mock(Service.class); ServiceInstance serviceInstance = Mockito.mock(ServiceInstance.class); RequestDetails requestDetails = Mockito.mock(RequestDetails.class); ModelInfo modelInfo = Mockito.mock(ModelInfo.class); - RequestInfo requestInfo = Mockito.mock(RequestInfo.class); + RequestInfo requestInfo = Mockito.mock(RequestInfo.class); RelatedInstanceList[] relatedInstanceList = new RelatedInstanceList[] {}; CloudConfiguration cloudConfiguration = new CloudConfiguration(); org.onap.so.serviceinstancebeans.Platform platform = Mockito @@ -727,13 +728,14 @@ public class BBInputSetupTest { doNothing().when(SPY_bbInputSetup).populateL3Network(instanceName, modelInfo, service, bbName, serviceInstance, lookupKeyMap, resourceId, null); doReturn(modelInfo).when(requestDetails).getModelInfo(); + doReturn(productFamilyId).when(requestInfo).getProductFamilyId(); doReturn(requestInfo).when(requestDetails).getRequestInfo(); doReturn(instanceName).when(requestInfo).getInstanceName(); doReturn(platform).when(requestDetails).getPlatform(); doReturn(lineOfBusiness).when(requestDetails).getLineOfBusiness(); doReturn(relatedInstanceList).when(requestDetails).getRelatedInstanceList(); doReturn(cloudConfiguration).when(requestDetails).getCloudConfiguration(); - + doReturn(ModelType.network).when(modelInfo).getModelType(); SPY_bbInputSetup.populateObjectsOnAssignAndCreateFlows(requestDetails, service, bbName, serviceInstance, lookupKeyMap, resourceId, vnfType); @@ -744,11 +746,11 @@ public class BBInputSetupTest { doReturn(ModelType.vnf).when(modelInfo).getModelType(); resourceId = "vnfId"; doNothing().when(SPY_bbInputSetup).populateGenericVnf(modelInfo, instanceName, platform, lineOfBusiness, - service, bbName, serviceInstance, lookupKeyMap, relatedInstanceList, resourceId, vnfType, null); + service, bbName, serviceInstance, lookupKeyMap, relatedInstanceList, resourceId, vnfType, null, productFamilyId); SPY_bbInputSetup.populateObjectsOnAssignAndCreateFlows(requestDetails, service, bbName, serviceInstance, lookupKeyMap, resourceId, vnfType); verify(SPY_bbInputSetup, times(1)).populateGenericVnf(modelInfo, instanceName, platform, lineOfBusiness, - service, bbName, serviceInstance, lookupKeyMap, relatedInstanceList, resourceId, vnfType, null); + service, bbName, serviceInstance, lookupKeyMap, relatedInstanceList, resourceId, vnfType, null, productFamilyId); assertEquals("VnfId populated", true, lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID).equalsIgnoreCase(resourceId)); doReturn(ModelType.volumeGroup).when(modelInfo).getModelType(); @@ -1208,26 +1210,29 @@ public class BBInputSetupTest { doReturn(catalogInstanceGroup).when(SPY_bbInputSetupUtils).getCatalogInstanceGroup(any()); SPY_bbInputSetup.populateGenericVnf(modelInfo, instanceName, platform, lineOfBusiness, service, bbName, - serviceInstance, lookupKeyMap, requestDetails.getRelatedInstanceList(), resourceId, vnfType, null); + serviceInstance, lookupKeyMap, requestDetails.getRelatedInstanceList(), resourceId, vnfType, null, + requestDetails.getRequestInfo().getProductFamilyId()); lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, null); SPY_bbInputSetup.populateGenericVnf(modelInfo, instanceName, platform, lineOfBusiness, service, bbName, - serviceInstance, lookupKeyMap, requestDetails.getRelatedInstanceList(), resourceId, vnfType, null); + serviceInstance, lookupKeyMap, requestDetails.getRelatedInstanceList(), resourceId, vnfType, null, + requestDetails.getRequestInfo().getProductFamilyId()); verify(SPY_bbInputSetup, times(1)).mapCatalogVnf(vnf, modelInfo, service); instanceName = "vnfName2"; GenericVnf vnf2 = SPY_bbInputSetup.createGenericVnf(lookupKeyMap, instanceName, platform, lineOfBusiness, - resourceId, vnfType, null); + resourceId, vnfType, null, requestDetails.getRequestInfo().getProductFamilyId()); doReturn(vnf2).when(SPY_bbInputSetup).createGenericVnf(lookupKeyMap, instanceName, platform, lineOfBusiness, - resourceId, vnfType, null); + resourceId, vnfType, null, requestDetails.getRequestInfo().getProductFamilyId()); doNothing().when(SPY_bbInputSetup).mapNetworkCollectionInstanceGroup(vnf2, "{instanceGroupId}"); doNothing().when(SPY_bbInputSetup).mapVnfcCollectionInstanceGroup(vnf2, modelInfo, service); lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, "genericVnfId2"); SPY_bbInputSetup.populateGenericVnf(modelInfo, instanceName, platform, lineOfBusiness, service, bbName, - serviceInstance, lookupKeyMap, requestDetails.getRelatedInstanceList(), resourceId, vnfType, null); + serviceInstance, lookupKeyMap, requestDetails.getRelatedInstanceList(), resourceId, vnfType, null, + requestDetails.getRequestInfo().getProductFamilyId()); verify(SPY_bbInputSetup, times(2)).mapCatalogVnf(vnf2, modelInfo, service); verify(SPY_bbInputSetup, times(2)).mapNetworkCollectionInstanceGroup(vnf2, "{instanceGroupId}"); verify(SPY_bbInputSetup, times(2)).mapVnfcCollectionInstanceGroup(vnf2, modelInfo, service); @@ -1297,17 +1302,19 @@ public class BBInputSetupTest { doReturn(catalogInstanceGroup).when(SPY_bbInputSetupUtils).getCatalogInstanceGroup(any()); SPY_bbInputSetup.populateGenericVnf(modelInfo, instanceName, platform, lineOfBusiness, service, bbName, - serviceInstance, lookupKeyMap, requestDetails.getRelatedInstanceList(), resourceId, vnfType, null); + serviceInstance, lookupKeyMap, requestDetails.getRelatedInstanceList(), resourceId, vnfType, null, + requestDetails.getRequestInfo().getProductFamilyId()); lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, null); SPY_bbInputSetup.populateGenericVnf(modelInfo, instanceName, platform, lineOfBusiness, service, bbName, - serviceInstance, lookupKeyMap, requestDetails.getRelatedInstanceList(), resourceId, vnfType, null); + serviceInstance, lookupKeyMap, requestDetails.getRelatedInstanceList(), resourceId, vnfType, null, + requestDetails.getRequestInfo().getProductFamilyId()); verify(SPY_bbInputSetup, times(1)).mapCatalogVnf(vnf, modelInfo, service); instanceName = "vnfName2"; GenericVnf vnf2 = SPY_bbInputSetup.createGenericVnf(lookupKeyMap, instanceName, platform, lineOfBusiness, - resourceId, vnfType, null); + resourceId, vnfType, null, requestDetails.getRequestInfo().getProductFamilyId()); org.onap.aai.domain.yang.GenericVnf vnf2AAI = new org.onap.aai.domain.yang.GenericVnf(); vnfAAI.setModelCustomizationId("modelCustId2"); @@ -1315,7 +1322,8 @@ public class BBInputSetupTest { doNothing().when(SPY_bbInputSetup).mapCatalogVnf(vnf2, modelInfo, service); doNothing().when(SPY_bbInputSetup).mapNetworkCollectionInstanceGroup(vnf2, "{instanceGroupId}"); SPY_bbInputSetup.populateGenericVnf(modelInfo, instanceName, platform, lineOfBusiness, service, bbName, - serviceInstance, lookupKeyMap, requestDetails.getRelatedInstanceList(), resourceId, vnfType, null); + serviceInstance, lookupKeyMap, requestDetails.getRelatedInstanceList(), resourceId, vnfType, null, + requestDetails.getRequestInfo().getProductFamilyId()); verify(SPY_bbInputSetup, times(2)).mapCatalogVnf(vnf2, modelInfo, service); verify(SPY_bbInputSetup, times(2)).mapNetworkCollectionInstanceGroup(vnf2, "{instanceGroupId}"); verify(SPY_bbInputSetup, times(1)).mapVnfcCollectionInstanceGroup(vnf2, modelInfo, service); @@ -1768,7 +1776,7 @@ public class BBInputSetupTest { verify(SPY_bbInputSetup, times(1)).populateGenericVnf(isA(ModelInfo.class), any(String.class), isA(org.onap.so.serviceinstancebeans.Platform.class), isA(org.onap.so.serviceinstancebeans.LineOfBusiness.class), isA(Service.class), any(String.class), - isA(ServiceInstance.class), any(), any(), any(String.class), any(String.class), any()); + isA(ServiceInstance.class), any(), any(), any(String.class), any(String.class), any(), any(String.class)); lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, null); executeBB.getBuildingBlock().setBpmnFlowName(AssignFlows.VF_MODULE.toString()); @@ -1943,7 +1951,7 @@ public class BBInputSetupTest { verify(SPY_bbInputSetup, times(1)).populateGenericVnf(isA(ModelInfo.class), any(String.class), isA(org.onap.so.serviceinstancebeans.Platform.class), isA(org.onap.so.serviceinstancebeans.LineOfBusiness.class), isA(Service.class), any(String.class), - isA(ServiceInstance.class), any(),ArgumentMatchers.isNull(), any(String.class), ArgumentMatchers.isNull(), any()); + isA(ServiceInstance.class), any(),ArgumentMatchers.isNull(), any(String.class), ArgumentMatchers.isNull(), any(), any(String.class)); lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, null); executeBB.getBuildingBlock().setBpmnFlowName(AssignFlows.VF_MODULE.toString()); @@ -2006,7 +2014,8 @@ public class BBInputSetupTest { verify(SPY_bbInputSetup, times(1)).populateGenericVnf(isA(ModelInfo.class), any(String.class), isA(org.onap.so.serviceinstancebeans.Platform.class), isA(org.onap.so.serviceinstancebeans.LineOfBusiness.class), isA(Service.class), any(String.class), - isA(ServiceInstance.class), any(), any(), any(String.class), any(String.class), any()); + isA(ServiceInstance.class), any(), any(), any(String.class), any(String.class), any(), + any(String.class)); lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, null); executeBB.getBuildingBlock().setBpmnFlowName(AssignFlows.VF_MODULE.toString()); @@ -2456,6 +2465,7 @@ public class BBInputSetupTest { String vnfType = "vnfType"; String platformName = "platformName"; String lineOfBusinessName = "lineOfBusinessName"; + String productFamilyId = "productFamilyId"; Platform platform = new Platform(); platform.setPlatformName(platformName); LineOfBusiness lineOfBusiness = new LineOfBusiness(); @@ -2470,6 +2480,8 @@ public class BBInputSetupTest { expected.setOrchestrationStatus(OrchestrationStatus.PRECREATED); expected.setPlatform(platform); expected.setLineOfBusiness(lineOfBusiness); + expected.setProvStatus("PREPROV"); + expected.setServiceId(productFamilyId); Map<ResourceKey, String> lookupKeyMap = new HashMap<>(); List<Map<String, String>> instanceParams = new ArrayList<>(); instanceParams.add(cloudParams); @@ -2481,13 +2493,14 @@ public class BBInputSetupTest { doReturn(platform).when(bbInputSetupMapperLayer).mapRequestPlatform(requestPlatform); doReturn(lineOfBusiness).when(bbInputSetupMapperLayer).mapRequestLineOfBusiness(requestLineOfBusiness); - GenericVnf actual = SPY_bbInputSetup.createGenericVnf(lookupKeyMap, instanceName, requestPlatform, requestLineOfBusiness, vnfId, vnfType, instanceParams); + GenericVnf actual = SPY_bbInputSetup.createGenericVnf(lookupKeyMap, instanceName, requestPlatform, requestLineOfBusiness, vnfId, vnfType, instanceParams, + productFamilyId); assertThat(actual, sameBeanAs(expected)); assertEquals("LookupKeyMap is populated", vnfId, lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID)); expected.getCloudParams().clear(); - actual = SPY_bbInputSetup.createGenericVnf(lookupKeyMap, instanceName, requestPlatform, requestLineOfBusiness, vnfId, vnfType, null); + actual = SPY_bbInputSetup.createGenericVnf(lookupKeyMap, instanceName, requestPlatform, requestLineOfBusiness, vnfId, vnfType, null, productFamilyId); assertThat(actual, sameBeanAs(expected)); } @@ -2538,6 +2551,12 @@ public class BBInputSetupTest { volumeGroup.setVolumeGroupId(volumeGroupId); vnf.getVolumeGroups().add(volumeGroup); serviceInstance.getVnfs().add(vnf); + VfModule vfModule1 = new VfModule(); + vfModule1.setVfModuleId("vfModuleId1"); + VfModule vfModule2 = new VfModule(); + vfModule2.setVfModuleId("vfModuleId2"); + vnf.getVfModules().add(vfModule1); + vnf.getVfModules().add(vfModule2); Map<ResourceKey, String> lookupKeyMap = new HashMap<>(); lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, vnfId); String resourceId = vfModuleId; @@ -2550,16 +2569,20 @@ public class BBInputSetupTest { vnfAAI.setModelCustomizationId("vnfModelCustId"); org.onap.aai.domain.yang.VolumeGroup volumeGroupAAI = new org.onap.aai.domain.yang.VolumeGroup(); volumeGroupAAI.setModelCustomizationId(vfModuleCustomizationId); + org.onap.aai.domain.yang.VfModule vfModuleAAI = new org.onap.aai.domain.yang.VfModule(); + vfModuleAAI.setModelCustomizationId(vfModuleCustomizationId); doReturn(vnfAAI).when(SPY_bbInputSetupUtils).getAAIGenericVnf(vnf.getVnfId()); doReturn(volumeGroupAAI).when(SPY_bbInputSetupUtils).getAAIVolumeGroup(CLOUD_OWNER, cloudConfiguration.getLcpCloudRegionId(), volumeGroup.getVolumeGroupId()); + doReturn(vfModuleAAI).when(SPY_bbInputSetupUtils).getAAIVfModule(isA(String.class), isA(String.class)); doNothing().when(SPY_bbInputSetup).mapCatalogVnf(isA(GenericVnf.class), isA(ModelInfo.class), isA(Service.class)); doNothing().when(SPY_bbInputSetup).mapCatalogVfModule(isA(VfModule.class), isA(ModelInfo.class), isA(Service.class), isA(String.class)); SPY_bbInputSetup.populateVfModule(modelInfo, service, bbName, serviceInstance, lookupKeyMap, resourceId, relatedInstanceList, instanceName, instanceParams, cloudConfiguration); + verify(SPY_bbInputSetup, times(3)).mapCatalogVfModule(isA(VfModule.class), isA(ModelInfo.class), isA(Service.class), isA(String.class)); assertEquals("Lookup Key Map populated with VfModule Id", vfModuleId, lookupKeyMap.get(ResourceKey.VF_MODULE_ID)); assertEquals("Lookup Key Map populated with VolumeGroup Id", volumeGroupId, lookupKeyMap.get(ResourceKey.VOLUME_GROUP_ID)); } diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java index f70912f725..ae1af8f960 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java @@ -25,7 +25,7 @@ import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Matchers.eq; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.ArgumentMatchers.isA; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.times; diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAITest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAITest.java index d53b2ae713..af7dc582e0 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAITest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAITest.java @@ -24,7 +24,7 @@ import static com.shazam.shazamcrest.MatcherAssert.assertThat; import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; -import static org.mockito.Matchers.isA; +import static org.mockito.ArgumentMatchers.isA; import static org.mockito.Mockito.doReturn; import java.io.File; diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildlingBlockRainyDayTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildlingBlockRainyDayTest.java index cb5683dcc8..6344a3f1a6 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildlingBlockRainyDayTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildlingBlockRainyDayTest.java @@ -93,7 +93,7 @@ public class ExecuteBuildlingBlockRainyDayTest extends BaseTest { vnf.setVnfType("vnft1"); delegateExecution.setVariable("aLaCarte", true); delegateExecution.setVariable("suppressRollback", false); - + delegateExecution.setVariable("WorkflowExceptionCode", "7000"); RainyDayHandlerStatus rainyDayHandlerStatus = new RainyDayHandlerStatus(); rainyDayHandlerStatus.setErrorCode("7000"); rainyDayHandlerStatus.setFlowName("AssignServiceInstanceBB"); @@ -116,7 +116,7 @@ public class ExecuteBuildlingBlockRainyDayTest extends BaseTest { vnf.setVnfType("vnft1"); delegateExecution.setVariable("aLaCarte", true); delegateExecution.setVariable("suppressRollback", false); - + delegateExecution.setVariable("WorkflowExceptionCode", ASTERISK); RainyDayHandlerStatus rainyDayHandlerStatus = new RainyDayHandlerStatus(); rainyDayHandlerStatus.setErrorCode(ASTERISK); rainyDayHandlerStatus.setFlowName("AssignServiceInstanceBB"); @@ -131,6 +131,7 @@ public class ExecuteBuildlingBlockRainyDayTest extends BaseTest { executeBuildingBlockRainyDay.queryRainyDayTable(delegateExecution,true); assertEquals("Rollback", delegateExecution.getVariable("handlingCode")); + assertEquals(5,delegateExecution.getVariable("maxRetries")); } @Test @@ -164,7 +165,7 @@ public class ExecuteBuildlingBlockRainyDayTest extends BaseTest { vnf.setVnfType("vnft1"); delegateExecution.setVariable("aLaCarte", true); delegateExecution.setVariable("suppressRollback", false); - + delegateExecution.setVariable("WorkflowExceptionCode", "7000"); RainyDayHandlerStatus rainyDayHandlerStatus = new RainyDayHandlerStatus(); rainyDayHandlerStatus.setErrorCode("7000"); rainyDayHandlerStatus.setFlowName("AssignServiceInstanceBB"); @@ -188,7 +189,7 @@ public class ExecuteBuildlingBlockRainyDayTest extends BaseTest { vnf.setVnfType("vnft1"); delegateExecution.setVariable("aLaCarte", false); delegateExecution.setVariable("suppressRollback", false); - + delegateExecution.setVariable("WorkflowExceptionCode", "7000"); RainyDayHandlerStatus rainyDayHandlerStatus = new RainyDayHandlerStatus(); rainyDayHandlerStatus.setErrorCode("7000"); rainyDayHandlerStatus.setFlowName("AssignServiceInstanceBB"); @@ -212,7 +213,7 @@ public class ExecuteBuildlingBlockRainyDayTest extends BaseTest { vnf.setVnfType("vnft1"); delegateExecution.setVariable("aLaCarte", true); delegateExecution.setVariable("suppressRollback", false); - + delegateExecution.setVariable("WorkflowExceptionCode", "7000"); RainyDayHandlerStatus rainyDayHandlerStatus = new RainyDayHandlerStatus(); rainyDayHandlerStatus.setErrorCode("7000"); rainyDayHandlerStatus.setFlowName("AssignServiceInstanceBB"); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClientTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClientTest.java index dbf2eb75fd..c50a6db178 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClientTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClientTest.java @@ -26,6 +26,7 @@ import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo; import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; import java.io.File; import java.io.IOException; @@ -46,6 +47,7 @@ public class DmaapPropertiesClientTest extends BaseTest{ @Autowired private DmaapPropertiesClient dmaapPropertiesClient; + private final String file = "src/test/resources/org/onap/so/client/avpn/dmaap/avpnDmaapAsyncRequestStatus.json"; private String requestId = "rq1234d1-5a33-55df-13ab-12abad84e331"; private String clientSource = "SPP"; @@ -73,7 +75,7 @@ public class DmaapPropertiesClientTest extends BaseTest{ @Test public void testDmaapPublishRequest() throws JsonProcessingException, MapperException { - stubFor(post(urlEqualTo("/events/com.att.mso.asyncStatusUpdate?timeout=20000")) + stubFor(post(urlEqualTo("/events/com.att.mso.asyncStatusUpdate?timeout=60000")) .willReturn(aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_ACCEPTED))); dmaapPropertiesClient.dmaapPublishRequest(requestId, clientSource, correlator, serviceInstanceId, startTime, finishTime, requestScope, diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/GlobalDmaapPublisherTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/GlobalDmaapPublisherTest.java index d380536a48..fc69f812be 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/GlobalDmaapPublisherTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/GlobalDmaapPublisherTest.java @@ -21,6 +21,7 @@ package org.onap.so.client.dmaapproperties; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import org.junit.Test; import org.onap.so.BaseTest; @@ -30,7 +31,8 @@ public class GlobalDmaapPublisherTest extends BaseTest{ @Autowired private GlobalDmaapPublisher globalDmaapPublisher; - + + @Test public void testGetters() { assertEquals("81B7E3533B91A6706830611FB9A8ECE529BBCCE754B1F1520FA7C8698B42F97235BEFA993A387E664D6352C63A6185D68DA7F0B1D360637CBA102CB166E3E62C11EB1F75386D3506BCECE51E54", globalDmaapPublisher.getAuth()); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java index d1013e7541..2e25449937 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java @@ -21,7 +21,7 @@ package org.onap.so.client.exception; import static org.junit.Assert.assertEquals; - +import static org.junit.Assert.assertTrue; import org.camunda.bpm.engine.delegate.BpmnError; import org.junit.Test; import org.onap.so.bpmn.mock.FileUtil; @@ -32,6 +32,7 @@ public class ExceptionBuilderTest extends BaseTest { private static final String RESOURCE_PATH = "__files/"; private static final String VALID_ERROR_MESSAGE = "{test error message}"; + @Test public void buildAndThrowWorkflowExceptionTest() { try { diff --git a/bpmn/MSOCommonBPMN/src/test/resources/application-test.yaml b/bpmn/MSOCommonBPMN/src/test/resources/application-test.yaml index b229fbd26a..afdb800ffe 100644 --- a/bpmn/MSOCommonBPMN/src/test/resources/application-test.yaml +++ b/bpmn/MSOCommonBPMN/src/test/resources/application-test.yaml @@ -84,7 +84,7 @@ mso: callbackRetryAttempts: '5' catalog: db: - endpoint: http://localhost:${wiremock.server.port}/ + endpoint: http://localhost:${wiremock.server.port}/ecomp/mso/catalog spring: endpoint: http://localhost:${wiremock.server.port} correlation: diff --git a/bpmn/MSOCommonBPMN/src/test/resources/vfModuleCount.xml b/bpmn/MSOCommonBPMN/src/test/resources/vfModuleCount.xml new file mode 100644 index 0000000000..b7dee68a77 --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/test/resources/vfModuleCount.xml @@ -0,0 +1,44 @@ +<vfModules> + <vf-module> + <module-index>0</module-index> + </vf-module> + <vf-module> + <module-index>1</module-index> + </vf-module> + <vf-module> + <module-index>2</module-index> + </vf-module> + <vf-module> + <module-index>3</module-index> + </vf-module> + <vf-module> + <module-index>4</module-index> + </vf-module> + <vf-module> + <module-index>5</module-index> + </vf-module> + <vf-module> + <module-index>6</module-index> + </vf-module> + <vf-module> + <module-index>7</module-index> + </vf-module> + <vf-module> + <module-index>8</module-index> + </vf-module> + <vf-module> + <module-index>9</module-index> + </vf-module> + <vf-module> + <module-index>10</module-index> + </vf-module> + <vf-module> + <module-index>11</module-index> + </vf-module> + <vf-module> + <module-index>12</module-index> + </vf-module> + <vf-module> + <module-index>13</module-index> + </vf-module> +</vfModules>
\ No newline at end of file |