From 2861d6dc7b05b7a7d716c7f2ff3201e2efbac2ba Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 7 Jan 2017 23:46:04 +0100 Subject: [PATCH] Fix test with Java 1.8 --- src/test/java/net/pterodactylus/sone/web/WebPageTest.java | 2 +- src/test/kotlin/net/pterodactylus/sone/web/OptionsPageTest.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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)) } -- 2.7.4