summaryrefslogtreecommitdiffstats
path: root/rest-services/http-client
diff options
context:
space:
mode:
authorIzabela Zawadzka <izabela.zawadzka@nokia.com>2019-05-14 09:05:49 +0200
committerIzabela Zawadzka <izabela.zawadzka@nokia.com>2019-05-14 14:50:57 +0200
commite8beff45a8cde47485d44b692ef579ce2b755f69 (patch)
tree174718c3df4f4d0f23a8afde2a2b75df1d5509b8 /rest-services/http-client
parentb1e0ceb789a9c0781bb3b97d4b1ff0e75396fd29 (diff)
Add tests for MR Subscriber
Change-Id: I705bcd5c0a75d9ac637afdb8cd6ac17b0af55c78 Issue-ID: DCAEGEN2-1422 Signed-off-by: Izabela Zawadzka <izabela.zawadzka@nokia.com>
Diffstat (limited to 'rest-services/http-client')
-rw-r--r--rest-services/http-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/test/DummyHttpServer.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/rest-services/http-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/test/DummyHttpServer.java b/rest-services/http-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/test/DummyHttpServer.java
index 2a1ba7a6..4795b00f 100644
--- a/rest-services/http-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/test/DummyHttpServer.java
+++ b/rest-services/http-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/test/DummyHttpServer.java
@@ -67,6 +67,10 @@ public class DummyHttpServer {
return sendString(httpServerResponse, Mono.fromCallable(() -> readResource(resourcePath)));
}
+ public static Publisher<Void> sendError(HttpServerResponse httpServerResponse, int statusCode, String message){
+ return sendString(httpServerResponse.status(statusCode), Mono.just(message));
+ }
+
public static Publisher<Void> sendString(HttpServerResponse httpServerResponse, Publisher<String> content) {
return httpServerResponse.sendString(content);
}