From: David ‘Bombe’ Roden Date: Fri, 5 May 2017 22:36:31 +0000 (+0200) Subject: Add method to set request method X-Git-Tag: 0.9.7^2~219 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=5c3400cf1183520f74adf692150393406dae2a88;p=Sone.git Add method to set request method --- diff --git a/src/test/java/net/pterodactylus/sone/web/pages/WebPageTest.java b/src/test/java/net/pterodactylus/sone/web/pages/WebPageTest.java index 9d77df7..f341238 100644 --- a/src/test/java/net/pterodactylus/sone/web/pages/WebPageTest.java +++ b/src/test/java/net/pterodactylus/sone/web/pages/WebPageTest.java @@ -309,6 +309,11 @@ public abstract class WebPageTest { when(webInterface.getCurrentSoneWithoutCreatingSession(toadletContext)).thenReturn(null); } + protected void setMethod(Method method) { + when(freenetRequest.getMethod()).thenReturn(method); + when(httpRequest.getMethod()).thenReturn(method.name()); + } + protected void request(String uri, Method method) { try { when(httpRequest.getPath()).thenReturn(uri);