From a1def3f61dd35f6bf9123ddfba2991debb317cee Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 19 Mar 2019 18:07:22 +0100 Subject: [PATCH] =?utf8?q?=F0=9F=8E=A8=20Replace=20profile=20test=20with?= =?utf8?q?=20Kotlin=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../net/pterodactylus/sone/data/ProfileTest.java | 24 ---------------------- .../net/pterodactylus/sone/data/ProfileTest.kt | 22 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 24 deletions(-) delete mode 100644 src/test/java/net/pterodactylus/sone/data/ProfileTest.java create mode 100644 src/test/kotlin/net/pterodactylus/sone/data/ProfileTest.kt diff --git a/src/test/java/net/pterodactylus/sone/data/ProfileTest.java b/src/test/java/net/pterodactylus/sone/data/ProfileTest.java deleted file mode 100644 index c0cb9de..0000000 --- a/src/test/java/net/pterodactylus/sone/data/ProfileTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package net.pterodactylus.sone.data; - -import net.pterodactylus.sone.data.Profile.Field; - -import org.hamcrest.MatcherAssert; -import org.hamcrest.Matchers; -import org.junit.Test; -import org.mockito.Mockito; - -/** - * Unit test for {@link Profile}. - */ -public class ProfileTest { - - private final Sone sone = Mockito.mock(Sone.class); - private final Profile profile = new Profile(sone); - - @Test - public void newFieldsAreInitializedWithAnEmptyString() { - Field newField = profile.addField("testField"); - MatcherAssert.assertThat(newField.getValue(), Matchers.is("")); - } - -} diff --git a/src/test/kotlin/net/pterodactylus/sone/data/ProfileTest.kt b/src/test/kotlin/net/pterodactylus/sone/data/ProfileTest.kt new file mode 100644 index 0000000..5c82574 --- /dev/null +++ b/src/test/kotlin/net/pterodactylus/sone/data/ProfileTest.kt @@ -0,0 +1,22 @@ +package net.pterodactylus.sone.data + +import net.pterodactylus.sone.test.* +import org.hamcrest.MatcherAssert.* +import org.hamcrest.Matchers.* +import org.junit.* + +/** + * Unit test for [Profile]. + */ +class ProfileTest { + + private val sone = mock() + private val profile = Profile(sone) + + @Test + fun `new fields are initialized with an empty string`() { + val newField = profile.addField("testField") + assertThat(newField.value, equalTo("")) + } + +} -- 2.7.4