X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FTestObjects.kt;fp=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FTestObjects.kt;h=ffd6f15b7aed7c60c2af23db538ee435c3dccaf8;hp=f9025330e52f23c62ad58cd05b775045f1f4e7d1;hb=5c5bee980f9cab5792e34d1c9840f73b8b191830;hpb=faf66247a34f64946990a985d2ea3003465969cb diff --git a/src/test/kotlin/net/pterodactylus/sone/web/ajax/TestObjects.kt b/src/test/kotlin/net/pterodactylus/sone/web/ajax/TestObjects.kt index f902533..ffd6f15 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/ajax/TestObjects.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/ajax/TestObjects.kt @@ -80,9 +80,7 @@ open class TestObjects { init { whenever(webInterface.templateContextFactory).thenReturn(TemplateContextFactory()) - whenever(webInterface.getCurrentSone(ArgumentMatchers.eq(toadletContext), ArgumentMatchers.anyBoolean())).thenReturn(currentSone) - whenever(webInterface.getCurrentSoneCreatingSession(toadletContext)).thenReturn(currentSone) - whenever(webInterface.getCurrentSoneWithoutCreatingSession(toadletContext)).thenReturn(currentSone) + whenever(webInterface.getCurrentSone(ArgumentMatchers.eq(toadletContext))).thenReturn(currentSone) whenever(webInterface.core).thenReturn(core) whenever(webInterface.formPassword).then { formPassword } whenever(webInterface.getNotifications(currentSone)).thenAnswer { notifications.values } @@ -139,9 +137,7 @@ open class TestObjects { } protected fun unsetCurrentSone() { - whenever(webInterface.getCurrentSone(ArgumentMatchers.eq(toadletContext), ArgumentMatchers.anyBoolean())).thenReturn(null) - whenever(webInterface.getCurrentSoneWithoutCreatingSession(toadletContext)).thenReturn(null) - whenever(webInterface.getCurrentSoneCreatingSession(toadletContext)).thenReturn(null) + whenever(webInterface.getCurrentSone(ArgumentMatchers.eq(toadletContext))).thenReturn(null) } protected fun postRequest() {