From: David ‘Bombe’ Roden Date: Sat, 7 Jan 2017 22:46:04 +0000 (+0100) Subject: Fix test with Java 1.8 X-Git-Tag: 0.9.7^2~360 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=2861d6dc7b05b7a7d716c7f2ff3201e2efbac2ba;p=Sone.git Fix test with Java 1.8 --- diff --git a/src/test/java/net/pterodactylus/sone/web/WebPageTest.java b/src/test/java/net/pterodactylus/sone/web/WebPageTest.java index df000b8..a6f7aa3 100644 --- a/src/test/java/net/pterodactylus/sone/web/WebPageTest.java +++ b/src/test/java/net/pterodactylus/sone/web/WebPageTest.java @@ -83,7 +83,7 @@ public abstract class WebPageTest { protected final TemplateContext templateContext = new TemplateContext(); protected final HTTPRequest httpRequest = mock(HTTPRequest.class); - protected final Multimap requestParameters = HashMultimap.create(); + protected final Multimap requestParameters = ArrayListMultimap.create(); protected final Map requestHeaders = new HashMap<>(); protected final FreenetRequest freenetRequest = mock(FreenetRequest.class); private final PipedOutputStream responseOutputStream = new PipedOutputStream(); diff --git a/src/test/kotlin/net/pterodactylus/sone/web/OptionsPageTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/OptionsPageTest.kt index b47dc34..cb8a3e5 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/OptionsPageTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/OptionsPageTest.kt @@ -92,9 +92,9 @@ class OptionsPageTest : WebPageTest() { private fun 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)) }