X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FWebPageTest.java;h=532c09adc5f5d36b0821cf5358f46f066131d04c;hp=3c6b1d4b5b85294278f2b036eb7c8566b2c6d4d7;hb=fdc047dd37e982776d55d827ca405868efe32c5a;hpb=de7568a82eb4150bf6d2b0553841b7b69f84c968 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 3c6b1d4..532c09a 100644 --- a/src/test/java/net/pterodactylus/sone/web/pages/WebPageTest.java +++ b/src/test/java/net/pterodactylus/sone/web/pages/WebPageTest.java @@ -274,6 +274,7 @@ public abstract class WebPageTest { @Before public final void setupWebInterface() { + when(webInterface.getCurrentSone(eq(toadletContext), anyBoolean())).thenReturn(currentSone); when(webInterface.getCurrentSoneCreatingSession(toadletContext)).thenReturn(currentSone); when(webInterface.getCurrentSoneWithoutCreatingSession(toadletContext)).thenReturn(currentSone); when(webInterface.getNotification(anyString())).thenReturn(Optional.absent()); @@ -290,6 +291,7 @@ public abstract class WebPageTest { } protected void unsetCurrentSone() { + when(webInterface.getCurrentSone(eq(toadletContext), anyBoolean())).thenReturn(null); when(webInterface.getCurrentSoneCreatingSession(toadletContext)).thenReturn(null); when(webInterface.getCurrentSoneWithoutCreatingSession(toadletContext)).thenReturn(null); }