Convert unit test to Kotlin
[Sone.git] / src / test / java / net / pterodactylus / sone / web / UploadImagePageTest.java
diff --git a/src/test/java/net/pterodactylus/sone/web/UploadImagePageTest.java b/src/test/java/net/pterodactylus/sone/web/UploadImagePageTest.java
deleted file mode 100644 (file)
index 3b8258e..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-package net.pterodactylus.sone.web;
-
-import static net.pterodactylus.sone.web.WebTestUtils.redirectsTo;
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-import net.pterodactylus.sone.data.Album;
-import net.pterodactylus.util.web.Method;
-
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Unit test for {@link UploadImagePageTest}.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
- */
-public class UploadImagePageTest extends WebPageTest {
-
-       private final UploadImagePage uploadImagePage = new UploadImagePage(template, webInterface);
-
-       private final Album parentAlbum = mock(Album.class);
-
-       @Before
-       public void setupParentAlbum() {
-               when(core.getAlbum("parent-id")).thenReturn(parentAlbum);
-               when(parentAlbum.getSone()).thenReturn(currentSone);
-       }
-
-       @Test
-       public void uploadingAnImageWithoutTitleRedirectsToEmptyImageTitlePage() throws Exception {
-               request("", Method.POST);
-               when(httpRequest.getPartAsStringFailsafe(eq("parent"), anyInt())).thenReturn("parent-id");
-               when(httpRequest.getPartAsStringFailsafe(eq("title"), anyInt())).thenReturn("  ");
-               expectedException.expect(redirectsTo("emptyImageTitle.html"));
-               uploadImagePage.processTemplate(freenetRequest, templateContext);
-       }
-
-}