🔥 Remove unnecessary imports
[Sone.git] / src / test / kotlin / net / pterodactylus / sone / template / ProfileAccessorTest.kt
index a2c4ad7..53d473e 100644 (file)
@@ -1,7 +1,6 @@
 package net.pterodactylus.sone.template
 
 import net.pterodactylus.sone.core.Core
-import net.pterodactylus.sone.data.Image
 import net.pterodactylus.sone.data.Profile
 import net.pterodactylus.sone.data.Sone
 import net.pterodactylus.sone.data.SoneOptions.DefaultSoneOptions
@@ -17,7 +16,7 @@ import net.pterodactylus.sone.test.mock
 import net.pterodactylus.sone.test.whenever
 import net.pterodactylus.util.template.TemplateContext
 import org.hamcrest.MatcherAssert.assertThat
-import org.hamcrest.Matchers.`is`
+import org.hamcrest.Matchers.equalTo
 import org.hamcrest.Matchers.nullValue
 import org.junit.Before
 import org.junit.Test
@@ -86,7 +85,7 @@ class ProfileAccessorTest {
        @Test
        fun `avatar ID is returned if profile belongs to local sone`() {
                whenever(remoteSone.isLocal).thenReturn(true)
-               assertThat(accessor.get(templateContext, profile, "avatar"), `is`<Any>("avatar-id"))
+               assertThat(accessor.get(templateContext, profile, "avatar"), equalTo<Any>("avatar-id"))
        }
 
        @Test
@@ -98,14 +97,14 @@ class ProfileAccessorTest {
        @Test
        fun `avatar ID is returned if sone is configure to always show avatars`() {
                currentSone.options.showCustomAvatars = ALWAYS
-               assertThat(accessor.get(templateContext, profile, "avatar"), `is`<Any>("avatar-id"))
+               assertThat(accessor.get(templateContext, profile, "avatar"), equalTo<Any>("avatar-id"))
        }
 
        @Test
        fun `avatar ID is returned if sone is configure to show avatars of followed sones and remote sone is followed`() {
                currentSone.options.showCustomAvatars = FOLLOWED
                whenever(currentSone.hasFriend("remote-sone")).thenReturn(true)
-               assertThat(accessor.get(templateContext, profile, "avatar"), `is`<Any>("avatar-id"))
+               assertThat(accessor.get(templateContext, profile, "avatar"), equalTo<Any>("avatar-id"))
        }
 
        @Test
@@ -142,7 +141,7 @@ class ProfileAccessorTest {
        fun `avatar ID is returned if sone is configure to show avatars based on manual trust and explicit trust is one`() {
                currentSone.options.showCustomAvatars = MANUALLY_TRUSTED
                setTrust(Trust(1, null, null))
-               assertThat(accessor.get(templateContext, profile, "avatar"), `is`<Any>("avatar-id"))
+               assertThat(accessor.get(templateContext, profile, "avatar"), equalTo<Any>("avatar-id"))
        }
 
        @Test
@@ -156,7 +155,7 @@ class ProfileAccessorTest {
        fun `avatar ID is returned if sone is configure to show avatars based on trust and explicit trust is one`() {
                currentSone.options.showCustomAvatars = TRUSTED
                setTrust(Trust(1, null, null))
-               assertThat(accessor.get(templateContext, profile, "avatar"), `is`<Any>("avatar-id"))
+               assertThat(accessor.get(templateContext, profile, "avatar"), equalTo<Any>("avatar-id"))
        }
 
        @Test
@@ -177,12 +176,12 @@ class ProfileAccessorTest {
        fun `avatar ID is returned if sone is configure to show avatars based on trust and implicit trust is one`() {
                currentSone.options.showCustomAvatars = TRUSTED
                setTrust(Trust(0, 1, null))
-               assertThat(accessor.get(templateContext, profile, "avatar"), `is`<Any>("avatar-id"))
+               assertThat(accessor.get(templateContext, profile, "avatar"), equalTo<Any>("avatar-id"))
        }
 
        @Test
        fun `accessing other members uses reflection accessor`() {
-               assertThat(accessor.get(templateContext, profile, "hashCode"), `is`<Any>(profile.hashCode()))
+               assertThat(accessor.get(templateContext, profile, "hashCode"), equalTo<Any>(profile.hashCode()))
        }
 
 }