From 902ec7ef30248c03096cf03da47e6bcca4372525 Mon Sep 17 00:00:00 2001 From: Arthur Martella Date: Thu, 21 Sep 2017 16:09:46 -0400 Subject: Move Homing Building Block into ONAP Files regarding the Homing building blocks added for use in vCPE flows. Change-Id: Iae9eb70b81ec7d473e6c4e9c821a9282dc40baa9 Issue-id: SO-138 Signed-off-by: Arthur Martella --- .../openecomp/mso/bpmn/mock/StubResponseSNIRO.java | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseSNIRO.java (limited to 'bpmn/MSOMockServer/src') diff --git a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseSNIRO.java b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseSNIRO.java new file mode 100644 index 0000000000..a8152d6b67 --- /dev/null +++ b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseSNIRO.java @@ -0,0 +1,51 @@ +/* + * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property. + */ +package org.openecomp.mso.bpmn.mock; + +import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; +import static com.github.tomakehurst.wiremock.client.WireMock.post; +import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; +import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo; + +/** + * Please describe the StubResponseSNIRO.java class + * + * @author cb645j + */ +public class StubResponseSNIRO { + + public static void setupAllMocks() { + + } + + public static void mockSNIRO() { + stubFor(post(urlEqualTo("/sniro/api/v2/placement")) + .willReturn(aResponse() + .withStatus(202) + .withHeader("Content-Type", "application/json"))); + } + + public static void mockSNIRO(String responseFile) { + stubFor(post(urlEqualTo("/sniro/api/v2/placement")) + .willReturn(aResponse() + .withStatus(202) + .withHeader("Content-Type", "application/json") + .withBodyFile(responseFile))); + } + + public static void mockSNIRO_400() { + stubFor(post(urlEqualTo("/sniro/api/v2/placement")) + .willReturn(aResponse() + .withStatus(400) + .withHeader("Content-Type", "application/json"))); + } + + public static void mockSNIRO_500() { + stubFor(post(urlEqualTo("/sniro/api/v2/placement")) + .willReturn(aResponse() + .withStatus(500) + .withHeader("Content-Type", "application/json"))); + } + +} -- cgit 1.2.3-korg