projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add method to set request method
[Sone.git]
/
src
/
test
/
java
/
net
/
pterodactylus
/
sone
/
web
/
pages
/
WebPageTest.java
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
(file)
--- 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);
}
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);
protected void request(String uri, Method method) {
try {
when(httpRequest.getPath()).thenReturn(uri);