Replace image implementation test with Kotlin version
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 27 Sep 2021 12:34:03 +0000 (14:34 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 27 Sep 2021 12:34:03 +0000 (14:34 +0200)
src/test/java/net/pterodactylus/sone/data/impl/ImageImplTest.java [deleted file]
src/test/kotlin/net/pterodactylus/sone/data/impl/ImageImplTest.kt [new file with mode: 0644]

diff --git a/src/test/java/net/pterodactylus/sone/data/impl/ImageImplTest.java b/src/test/java/net/pterodactylus/sone/data/impl/ImageImplTest.java
deleted file mode 100644 (file)
index b3801b2..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-package net.pterodactylus.sone.data.impl;
-
-import net.pterodactylus.sone.data.Image;
-import net.pterodactylus.sone.data.Image.Modifier.ImageTitleMustNotBeEmpty;
-
-import org.junit.Test;
-
-/**
- * Unit test for {@link ImageImpl}.
- */
-public class ImageImplTest {
-
-       private final Image image = new ImageImpl();
-
-       @Test(expected = ImageTitleMustNotBeEmpty.class)
-       public void modifierDoesNotAllowTitleDoBeEmpty() {
-               image.modify().setTitle("").update();
-       }
-
-}
diff --git a/src/test/kotlin/net/pterodactylus/sone/data/impl/ImageImplTest.kt b/src/test/kotlin/net/pterodactylus/sone/data/impl/ImageImplTest.kt
new file mode 100644 (file)
index 0000000..022bde0
--- /dev/null
@@ -0,0 +1,18 @@
+package net.pterodactylus.sone.data.impl
+
+import net.pterodactylus.sone.data.Image
+import org.junit.Test
+
+/**
+ * Unit test for [ImageImpl].
+ */
+class ImageImplTest {
+
+    private val image = ImageImpl()
+
+    @Test(expected = Image.Modifier.ImageTitleMustNotBeEmpty::class)
+    fun `modifier does not allow title to be empty`() {
+        image.modify().setTitle("").update()
+    }
+
+}