From: David ‘Bombe’ Roden Date: Mon, 27 Sep 2021 12:34:03 +0000 (+0200) Subject: Replace image implementation test with Kotlin version X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=2d3755cb61411caa257ad9e605b4b828649bbbdc;p=Sone.git Replace image implementation test with Kotlin version --- 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 index b3801b2..0000000 --- a/src/test/java/net/pterodactylus/sone/data/impl/ImageImplTest.java +++ /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 index 0000000..022bde0 --- /dev/null +++ b/src/test/kotlin/net/pterodactylus/sone/data/impl/ImageImplTest.kt @@ -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() + } + +}