From 2d3755cb61411caa257ad9e605b4b828649bbbdc Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 27 Sep 2021 14:34:03 +0200 Subject: [PATCH] Replace image implementation test with Kotlin version --- .../pterodactylus/sone/data/impl/ImageImplTest.java | 20 -------------------- .../pterodactylus/sone/data/impl/ImageImplTest.kt | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 20 deletions(-) delete mode 100644 src/test/java/net/pterodactylus/sone/data/impl/ImageImplTest.java create mode 100644 src/test/kotlin/net/pterodactylus/sone/data/impl/ImageImplTest.kt 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() + } + +} -- 2.7.4