Remove unnecessary type parameters
[Sone.git] / src / test / kotlin / net / pterodactylus / sone / web / pages / KnownSonesPageTest.kt
index 70a5eea..a9763e0 100644 (file)
@@ -8,12 +8,15 @@ import net.pterodactylus.sone.data.Profile
 import net.pterodactylus.sone.data.Sone
 import net.pterodactylus.sone.freenet.wot.Identity
 import net.pterodactylus.sone.freenet.wot.OwnIdentity
+import net.pterodactylus.sone.test.getInstance
 import net.pterodactylus.sone.test.mock
 import net.pterodactylus.sone.test.whenever
 import net.pterodactylus.sone.utils.Pagination
+import net.pterodactylus.sone.web.baseInjector
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.contains
 import org.hamcrest.Matchers.equalTo
+import org.hamcrest.Matchers.notNullValue
 import org.junit.Before
 import org.junit.Test
 
@@ -50,7 +53,7 @@ class KnownSonesPageTest: WebPageTest(::KnownSonesPage) {
                        whenever(albums).thenReturn(listOf(album))
                }
                whenever(this.rootAlbum).thenReturn(rootAlbum)
-               whenever(this.profile).thenReturn(mock<Profile>())
+               whenever(this.profile).thenReturn(mock())
                whenever(id).thenReturn(name.toLowerCase())
                whenever(this.name).thenReturn(name)
        }
@@ -242,4 +245,9 @@ class KnownSonesPageTest: WebPageTest(::KnownSonesPage) {
                }
        }
 
+       @Test
+       fun `page can be created by dependency injection`() {
+           assertThat(baseInjector.getInstance<KnownSonesPage>(), notNullValue())
+       }
+
 }