X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ftext%2FSonePartTest.kt;fp=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ftext%2FSonePartTest.kt;h=361bd19f4ff26a3403d07b089b1639882ef34def;hp=0000000000000000000000000000000000000000;hb=de6d73a2f0718ff65832859a3ef7ba4f32299327;hpb=4273a6ebdde8c4f1092a6c5d4f62ad483f3eaa96 diff --git a/src/test/kotlin/net/pterodactylus/sone/text/SonePartTest.kt b/src/test/kotlin/net/pterodactylus/sone/text/SonePartTest.kt new file mode 100644 index 0000000..361bd19 --- /dev/null +++ b/src/test/kotlin/net/pterodactylus/sone/text/SonePartTest.kt @@ -0,0 +1,30 @@ +package net.pterodactylus.sone.text + +import net.pterodactylus.sone.data.Profile +import net.pterodactylus.sone.data.Sone +import net.pterodactylus.sone.test.mock +import org.hamcrest.MatcherAssert.assertThat +import org.hamcrest.Matchers.`is` +import org.junit.Test +import org.mockito.Mockito.`when` + +/** + * Unit test for [SonePart]. + */ +class SonePartTest { + + private val sone = mock() + + init { + `when`(sone.profile).thenReturn(mock()) + `when`(sone.name).thenReturn("sone") + } + + private val part = SonePart(sone) + + @Test + fun textIsConstructedFromSonesNiceName() { + assertThat(part.text, `is`("sone")) + } + +}