From 0502c4a725498477338c6c4ba84b6ccf9f6b727a Mon Sep 17 00:00:00 2001 From: c00149107 Date: Thu, 1 Mar 2018 16:01:25 +0800 Subject: Support decompose service by model uuid Support decompose service by model uuid Change-Id: Ib6f751440bc9c60df12e18857f23b4c62181b9c6 Issue-ID: SO-451 Signed-off-by: c00149107 --- .../src/test/java/org/openecomp/mso/bpmn/common/HomingTest.java | 5 +++-- .../java/org/openecomp/mso/bpmn/mock/StubResponseDatabase.java | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'bpmn/MSOCommonBPMN/src/test/java/org') diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/HomingTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/HomingTest.java index 4296c74392..3210fe8fc7 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/HomingTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/HomingTest.java @@ -23,7 +23,7 @@ */ package org.openecomp.mso.bpmn.common; -import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.MockGetServiceResourcesCatalogData; +import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.MockGetServiceResourcesCatalogDataByModelUuid; import static org.openecomp.mso.bpmn.mock.StubResponseSNIRO.*; import static org.junit.Assert.*; @@ -235,7 +235,8 @@ public class HomingTest extends WorkflowTest { // Create a Service Decomposition //System.out.println("At start of testHoming_success_vnfResourceList"); - MockGetServiceResourcesCatalogData("1cc4e2e4-eb6e-404d-a66f-c8733cedcce8", "5.0", "/BuildingBlocks/catalogResp.json"); + MockGetServiceResourcesCatalogDataByModelUuid("2f7f309d-c842-4644-a2e4-34167be5eeb4", "/BuildingBlocks/catalogResp.json"); + //MockGetServiceResourcesCatalogData("1cc4e2e4-eb6e-404d-a66f-c8733cedcce8", "5.0", "/BuildingBlocks/catalogResp.json"); String busKey = UUID.randomUUID().toString(); Map vars = new HashMap<>(); setVariablesForServiceDecomposition(vars, "testRequestId123", "ff5256d2-5a33-55df-13ab-12abad84e7ff"); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/StubResponseDatabase.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/StubResponseDatabase.java index c9f64d9b26..ffa6701a89 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/StubResponseDatabase.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/StubResponseDatabase.java @@ -98,5 +98,13 @@ public class StubResponseDatabase { .withBodyFile(responseFile))); } + public static void MockGetServiceResourcesCatalogDataByModelUuid(String serviceModelUuid, String responseFile){ + stubFor(get(urlEqualTo("/v2/serviceResources?serviceModelUuid=" + serviceModelUuid)) + .willReturn(aResponse() + .withStatus(200) + .withHeader("Content-Type", "application/json") + .withBodyFile(responseFile))); + } + } -- cgit 1.2.3-korg