protected final TemplateContext templateContext = new TemplateContext();
protected final HTTPRequest httpRequest = mock(HTTPRequest.class);
- protected final Multimap<String, String> requestParameters = HashMultimap.create();
+ protected final Multimap<String, String> requestParameters = ArrayListMultimap.create();
protected final Map<String, String> requestHeaders = new HashMap<>();
protected final FreenetRequest freenetRequest = mock(FreenetRequest.class);
private final PipedOutputStream responseOutputStream = new PipedOutputStream();
private fun <T> verifyThatOptionCanBeSet(option: String, setValue: Any?, expectedValue: T, getter: () -> T) {
request("", POST)
+ addHttpRequestParameter(option, setValue.toString())
addHttpRequestParameter("show-custom-avatars", "ALWAYS")
addHttpRequestParameter("load-linked-images", "ALWAYS")
- addHttpRequestParameter(option, setValue.toString())
verifyRedirect("options.html") {
assertThat(getter(), equalTo(expectedValue))
}