From: David ‘Bombe’ Roden Date: Tue, 11 Oct 2016 19:38:59 +0000 (+0200) Subject: Setup core and web interface separately X-Git-Tag: 0.9.6^2~25 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=e30087dacaf59f2328e74f1a88a2be3e60a93e80 Setup core and web interface separately --- diff --git a/src/test/java/net/pterodactylus/sone/web/WebPageTest.java b/src/test/java/net/pterodactylus/sone/web/WebPageTest.java index 3cbc75e..c135d07 100644 --- a/src/test/java/net/pterodactylus/sone/web/WebPageTest.java +++ b/src/test/java/net/pterodactylus/sone/web/WebPageTest.java @@ -55,9 +55,13 @@ public abstract class WebPageTest { } @Before - public final void setupWebInterface() { + public final void setupCore() { UpdateChecker updateChecker = mock(UpdateChecker.class); when(webInterface.getCore().getUpdateChecker()).thenReturn(updateChecker); + } + + @Before + public final void setupWebInterface() { when(webInterface.getCurrentSone(toadletContext)).thenReturn(currentSone); when(webInterface.getCurrentSone(eq(toadletContext), anyBoolean())).thenReturn(currentSone); when(webInterface.getNotifications(currentSone)).thenReturn(new ArrayList());