diff options
author | Rob Daugherty <rd472p@att.com> | 2017-09-22 01:28:45 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-09-22 01:28:45 +0000 |
commit | bf1dc58d9b8a6db720f1b3cdff14d3b794b9f60a (patch) | |
tree | 73e424802ee860d6783f68f547d30705a84b0e95 /bpmn/MSOMockServer/src | |
parent | 913c5a555ab7faea48b477a3ff21d201ea427c73 (diff) | |
parent | 902ec7ef30248c03096cf03da47e6bcca4372525 (diff) |
Merge "Move Homing Building Block into ONAP"
Diffstat (limited to 'bpmn/MSOMockServer/src')
-rw-r--r-- | bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/StubResponseSNIRO.java | 51 |
1 files changed, 51 insertions, 0 deletions
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")));
+ }
+
+}
|