From d14188d87056cfd63490ef9f16f4aae0c1864864 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 23 Feb 2019 00:13:49 +0100 Subject: [PATCH] Optimize some imports --- .../pterodactylus/sone/database/AlbumProvider.kt | 4 +--- .../pterodactylus/sone/database/ImageProvider.kt | 4 +--- .../pterodactylus/sone/database/PostProvider.kt | 8 +++---- .../sone/database/PostReplyProvider.kt | 3 +-- .../pterodactylus/sone/database/PostReplyStore.kt | 3 +-- .../net/pterodactylus/sone/database/PostStore.kt | 3 +-- .../pterodactylus/sone/database/ReplyBuilder.kt | 3 +-- .../pterodactylus/sone/database/SoneProvider.kt | 9 +++----- .../sone/web/ajax/CreatePostAjaxPage.kt | 16 +++++-------- .../sone/web/ajax/CreateReplyAjaxPage.kt | 15 +++++------- .../sone/web/ajax/DeletePostAjaxPage.kt | 12 ++++------ .../sone/web/ajax/DeleteReplyAjaxPage.kt | 12 ++++------ .../sone/web/ajax/DistrustAjaxPage.kt | 13 +++++------ .../pterodactylus/sone/web/ajax/TrustAjaxPage.kt | 11 ++++----- .../sone/web/pages/MarkAsKnownPage.kt | 14 +++++------ .../pterodactylus/sone/web/pages/UnbookmarkPage.kt | 16 +++++-------- .../pterodactylus/sone/web/pages/ViewPostPage.kt | 16 ++++++------- .../sone/fcp/CreateReplyCommandTest.kt | 15 +++++------- .../sone/fcp/DeletePostCommandTest.kt | 16 ++++++------- .../sone/fcp/DeleteReplyCommandTest.kt | 16 ++++++------- .../pterodactylus/sone/fcp/LikePostCommandTest.kt | 18 ++++++--------- .../pterodactylus/sone/fcp/LikeReplyCommandTest.kt | 19 ++++++--------- .../net/pterodactylus/sone/fcp/SoneCommandTest.kt | 27 ++++++++-------------- .../sone/web/ajax/BookmarkAjaxPageTest.kt | 13 +++++------ .../sone/web/ajax/DeletePostAjaxPageTest.kt | 18 ++++++--------- .../web/ajax/DeleteProfileFieldAjaxPageTest.kt | 14 +++++------ .../sone/web/ajax/DeleteReplyAjaxPageTest.kt | 18 ++++++--------- .../web/ajax/DismissNotificationAjaxPageTest.kt | 17 ++++++-------- .../sone/web/ajax/FollowSoneAjaxPageTest.kt | 17 ++++++-------- .../sone/web/ajax/LockSoneAjaxPageTest.kt | 16 ++++++------- .../sone/web/ajax/MarkAsKnownAjaxPageTest.kt | 21 ++++++----------- .../sone/web/ajax/UnfollowSoneAjaxPageTest.kt | 17 ++++++-------- .../sone/web/ajax/UnlockSoneAjaxPageTest.kt | 16 ++++++------- .../sone/web/ajax/UntrustAjaxPageTest.kt | 17 ++++++-------- 34 files changed, 183 insertions(+), 274 deletions(-) diff --git a/src/main/kotlin/net/pterodactylus/sone/database/AlbumProvider.kt b/src/main/kotlin/net/pterodactylus/sone/database/AlbumProvider.kt index c0b09e8..01693d5 100644 --- a/src/main/kotlin/net/pterodactylus/sone/database/AlbumProvider.kt +++ b/src/main/kotlin/net/pterodactylus/sone/database/AlbumProvider.kt @@ -17,9 +17,7 @@ package net.pterodactylus.sone.database -import net.pterodactylus.sone.data.Album - -import com.google.common.base.Optional +import net.pterodactylus.sone.data.* /** * Interface for objects that can provide [Album]s by their ID. diff --git a/src/main/kotlin/net/pterodactylus/sone/database/ImageProvider.kt b/src/main/kotlin/net/pterodactylus/sone/database/ImageProvider.kt index c7cc75e..6ef15a2 100644 --- a/src/main/kotlin/net/pterodactylus/sone/database/ImageProvider.kt +++ b/src/main/kotlin/net/pterodactylus/sone/database/ImageProvider.kt @@ -17,9 +17,7 @@ package net.pterodactylus.sone.database -import net.pterodactylus.sone.data.Image - -import com.google.common.base.Optional +import net.pterodactylus.sone.data.* /** * Provides [Image]s. diff --git a/src/main/kotlin/net/pterodactylus/sone/database/PostProvider.kt b/src/main/kotlin/net/pterodactylus/sone/database/PostProvider.kt index 37cb2a1..32f6bbb 100644 --- a/src/main/kotlin/net/pterodactylus/sone/database/PostProvider.kt +++ b/src/main/kotlin/net/pterodactylus/sone/database/PostProvider.kt @@ -17,11 +17,9 @@ package net.pterodactylus.sone.database -import net.pterodactylus.sone.data.Post -import net.pterodactylus.sone.database.memory.MemoryDatabase - -import com.google.common.base.Optional -import com.google.inject.ImplementedBy +import com.google.inject.* +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.database.memory.* /** * Interface for objects that can provide [Post]s by their ID. diff --git a/src/main/kotlin/net/pterodactylus/sone/database/PostReplyProvider.kt b/src/main/kotlin/net/pterodactylus/sone/database/PostReplyProvider.kt index 7e09017..17fcfe9 100644 --- a/src/main/kotlin/net/pterodactylus/sone/database/PostReplyProvider.kt +++ b/src/main/kotlin/net/pterodactylus/sone/database/PostReplyProvider.kt @@ -17,8 +17,7 @@ package net.pterodactylus.sone.database -import com.google.common.base.Optional -import net.pterodactylus.sone.data.PostReply +import net.pterodactylus.sone.data.* /** * Interface for objects that can provide [PostReply]s. diff --git a/src/main/kotlin/net/pterodactylus/sone/database/PostReplyStore.kt b/src/main/kotlin/net/pterodactylus/sone/database/PostReplyStore.kt index 08ba380..c84942e 100644 --- a/src/main/kotlin/net/pterodactylus/sone/database/PostReplyStore.kt +++ b/src/main/kotlin/net/pterodactylus/sone/database/PostReplyStore.kt @@ -17,8 +17,7 @@ package net.pterodactylus.sone.database -import net.pterodactylus.sone.data.PostReply -import net.pterodactylus.sone.data.Sone +import net.pterodactylus.sone.data.* /** * Defines a store for [post replies][PostReply]. diff --git a/src/main/kotlin/net/pterodactylus/sone/database/PostStore.kt b/src/main/kotlin/net/pterodactylus/sone/database/PostStore.kt index 3cb5f17..bf79721 100644 --- a/src/main/kotlin/net/pterodactylus/sone/database/PostStore.kt +++ b/src/main/kotlin/net/pterodactylus/sone/database/PostStore.kt @@ -17,8 +17,7 @@ package net.pterodactylus.sone.database -import net.pterodactylus.sone.data.Post -import net.pterodactylus.sone.data.Sone +import net.pterodactylus.sone.data.* /** * Interface for a store for posts. diff --git a/src/main/kotlin/net/pterodactylus/sone/database/ReplyBuilder.kt b/src/main/kotlin/net/pterodactylus/sone/database/ReplyBuilder.kt index 1aa6039..45c0165 100644 --- a/src/main/kotlin/net/pterodactylus/sone/database/ReplyBuilder.kt +++ b/src/main/kotlin/net/pterodactylus/sone/database/ReplyBuilder.kt @@ -17,8 +17,7 @@ package net.pterodactylus.sone.database -import net.pterodactylus.sone.data.Reply -import net.pterodactylus.sone.data.Sone +import net.pterodactylus.sone.data.* /** * Methods that all reply builders need to implement in order to be able to diff --git a/src/main/kotlin/net/pterodactylus/sone/database/SoneProvider.kt b/src/main/kotlin/net/pterodactylus/sone/database/SoneProvider.kt index b8ce5e1..ef1b5b2 100644 --- a/src/main/kotlin/net/pterodactylus/sone/database/SoneProvider.kt +++ b/src/main/kotlin/net/pterodactylus/sone/database/SoneProvider.kt @@ -17,12 +17,9 @@ package net.pterodactylus.sone.database -import net.pterodactylus.sone.core.Core -import net.pterodactylus.sone.data.Sone - -import com.google.common.base.Function -import com.google.common.base.Optional -import com.google.inject.ImplementedBy +import com.google.inject.* +import net.pterodactylus.sone.core.* +import net.pterodactylus.sone.data.* /** * Interface for objects that can provide [Sone]s by their ID. diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/CreatePostAjaxPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/CreatePostAjaxPage.kt index 47535c0..00bc6c2 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/CreatePostAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/CreatePostAjaxPage.kt @@ -1,15 +1,11 @@ package net.pterodactylus.sone.web.ajax -import net.pterodactylus.sone.data.Sone -import net.pterodactylus.sone.text.TextFilter -import net.pterodactylus.sone.utils.asOptional -import net.pterodactylus.sone.utils.emptyToNull -import net.pterodactylus.sone.utils.headers -import net.pterodactylus.sone.utils.let -import net.pterodactylus.sone.utils.parameters -import net.pterodactylus.sone.web.WebInterface -import net.pterodactylus.sone.web.page.FreenetRequest -import javax.inject.Inject +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.text.* +import net.pterodactylus.sone.utils.* +import net.pterodactylus.sone.web.* +import net.pterodactylus.sone.web.page.* +import javax.inject.* /** * AJAX handler that creates a new post. diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/CreateReplyAjaxPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/CreateReplyAjaxPage.kt index 6de69e3..7cb9752 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/CreateReplyAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/CreateReplyAjaxPage.kt @@ -1,14 +1,11 @@ package net.pterodactylus.sone.web.ajax -import net.pterodactylus.sone.data.Sone -import net.pterodactylus.sone.text.TextFilter -import net.pterodactylus.sone.utils.emptyToNull -import net.pterodactylus.sone.utils.headers -import net.pterodactylus.sone.utils.let -import net.pterodactylus.sone.utils.parameters -import net.pterodactylus.sone.web.WebInterface -import net.pterodactylus.sone.web.page.FreenetRequest -import javax.inject.Inject +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.text.* +import net.pterodactylus.sone.utils.* +import net.pterodactylus.sone.web.* +import net.pterodactylus.sone.web.page.* +import javax.inject.* /** * This AJAX page create a reply. diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/DeletePostAjaxPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/DeletePostAjaxPage.kt index 62f18c9..4696cc5 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/DeletePostAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/DeletePostAjaxPage.kt @@ -1,12 +1,10 @@ package net.pterodactylus.sone.web.ajax -import net.pterodactylus.sone.data.Sone -import net.pterodactylus.sone.utils.ifTrue -import net.pterodactylus.sone.utils.let -import net.pterodactylus.sone.utils.parameters -import net.pterodactylus.sone.web.WebInterface -import net.pterodactylus.sone.web.page.FreenetRequest -import javax.inject.Inject +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.utils.* +import net.pterodactylus.sone.web.* +import net.pterodactylus.sone.web.page.* +import javax.inject.* /** * This AJAX page deletes a post. diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/DeleteReplyAjaxPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/DeleteReplyAjaxPage.kt index d422c69..a7ef1a1 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/DeleteReplyAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/DeleteReplyAjaxPage.kt @@ -1,12 +1,10 @@ package net.pterodactylus.sone.web.ajax -import net.pterodactylus.sone.data.Sone -import net.pterodactylus.sone.utils.ifTrue -import net.pterodactylus.sone.utils.let -import net.pterodactylus.sone.utils.parameters -import net.pterodactylus.sone.web.WebInterface -import net.pterodactylus.sone.web.page.FreenetRequest -import javax.inject.Inject +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.utils.* +import net.pterodactylus.sone.web.* +import net.pterodactylus.sone.web.page.* +import javax.inject.* /** * This AJAX page deletes a reply. diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/DistrustAjaxPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/DistrustAjaxPage.kt index 10384df..e4f2327 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/DistrustAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/DistrustAjaxPage.kt @@ -1,12 +1,11 @@ package net.pterodactylus.sone.web.ajax -import net.pterodactylus.sone.core.Core -import net.pterodactylus.sone.data.Sone -import net.pterodactylus.sone.utils.let -import net.pterodactylus.sone.utils.parameters -import net.pterodactylus.sone.web.WebInterface -import net.pterodactylus.sone.web.page.FreenetRequest -import javax.inject.Inject +import net.pterodactylus.sone.core.* +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.utils.* +import net.pterodactylus.sone.web.* +import net.pterodactylus.sone.web.page.* +import javax.inject.* /** * AJAX page that lets the user distrust a Sone. diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/TrustAjaxPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/TrustAjaxPage.kt index ef806eb..bfb88b7 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/TrustAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/TrustAjaxPage.kt @@ -1,11 +1,10 @@ package net.pterodactylus.sone.web.ajax -import net.pterodactylus.sone.data.Sone -import net.pterodactylus.sone.utils.let -import net.pterodactylus.sone.utils.parameters -import net.pterodactylus.sone.web.WebInterface -import net.pterodactylus.sone.web.page.FreenetRequest -import javax.inject.Inject +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.utils.* +import net.pterodactylus.sone.web.* +import net.pterodactylus.sone.web.page.* +import javax.inject.* /** * AJAX page that lets the user trust a Sone. diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/MarkAsKnownPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/MarkAsKnownPage.kt index b1e100f..f071bcd 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/MarkAsKnownPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/MarkAsKnownPage.kt @@ -1,13 +1,11 @@ package net.pterodactylus.sone.web.pages -import net.pterodactylus.sone.data.Post -import net.pterodactylus.sone.utils.mapPresent -import net.pterodactylus.sone.utils.parameters -import net.pterodactylus.sone.web.WebInterface -import net.pterodactylus.sone.web.page.FreenetRequest -import net.pterodactylus.util.template.Template -import net.pterodactylus.util.template.TemplateContext -import javax.inject.Inject +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.utils.* +import net.pterodactylus.sone.web.* +import net.pterodactylus.sone.web.page.* +import net.pterodactylus.util.template.* +import javax.inject.* /** * Page that lets the user mark a number of [net.pterodactylus.sone.data.Sone]s, [Post]s, or diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/UnbookmarkPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/UnbookmarkPage.kt index 58cd0d8..dccaf46 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/UnbookmarkPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/UnbookmarkPage.kt @@ -1,15 +1,11 @@ package net.pterodactylus.sone.web.pages -import net.pterodactylus.sone.data.Post -import net.pterodactylus.sone.utils.also -import net.pterodactylus.sone.utils.isGET -import net.pterodactylus.sone.utils.isPOST -import net.pterodactylus.sone.utils.parameters -import net.pterodactylus.sone.web.WebInterface -import net.pterodactylus.sone.web.page.FreenetRequest -import net.pterodactylus.util.template.Template -import net.pterodactylus.util.template.TemplateContext -import javax.inject.Inject +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.utils.* +import net.pterodactylus.sone.web.* +import net.pterodactylus.sone.web.page.* +import net.pterodactylus.util.template.* +import javax.inject.* /** * Page that lets the user unbookmark a post. diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/ViewPostPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/ViewPostPage.kt index 0856e86..04a60b0 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/ViewPostPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/ViewPostPage.kt @@ -1,14 +1,12 @@ package net.pterodactylus.sone.web.pages -import net.pterodactylus.sone.template.SoneAccessor -import net.pterodactylus.sone.utils.let -import net.pterodactylus.sone.utils.parameters -import net.pterodactylus.sone.web.WebInterface -import net.pterodactylus.sone.web.page.FreenetRequest -import net.pterodactylus.util.template.Template -import net.pterodactylus.util.template.TemplateContext -import java.net.URI -import javax.inject.Inject +import net.pterodactylus.sone.template.* +import net.pterodactylus.sone.utils.* +import net.pterodactylus.sone.web.* +import net.pterodactylus.sone.web.page.* +import net.pterodactylus.util.template.* +import java.net.* +import javax.inject.* /** * This page lets the user view a post and all its replies. diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/CreateReplyCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/CreateReplyCommandTest.kt index 1cd53a5..373e3db 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/CreateReplyCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/CreateReplyCommandTest.kt @@ -1,14 +1,11 @@ package net.pterodactylus.sone.fcp -import com.google.common.base.Optional.of -import net.pterodactylus.sone.core.Core -import net.pterodactylus.sone.data.Post -import net.pterodactylus.sone.data.PostReply -import net.pterodactylus.sone.test.mock -import net.pterodactylus.sone.test.whenever -import org.hamcrest.MatcherAssert.assertThat -import org.hamcrest.Matchers.equalTo -import org.junit.Test +import net.pterodactylus.sone.core.* +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.test.* +import org.hamcrest.MatcherAssert.* +import org.hamcrest.Matchers.* +import org.junit.* /** * Unit test for [CreateReplyCommand]. diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/DeletePostCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/DeletePostCommandTest.kt index 651614f..15173d2 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/DeletePostCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/DeletePostCommandTest.kt @@ -1,14 +1,12 @@ package net.pterodactylus.sone.fcp -import com.google.common.base.Optional.of -import net.pterodactylus.sone.core.Core -import net.pterodactylus.sone.data.Post -import net.pterodactylus.sone.test.mock -import net.pterodactylus.sone.test.whenever -import org.hamcrest.MatcherAssert.assertThat -import org.hamcrest.Matchers.equalTo -import org.junit.Test -import org.mockito.Mockito.verify +import net.pterodactylus.sone.core.* +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.test.* +import org.hamcrest.MatcherAssert.* +import org.hamcrest.Matchers.* +import org.junit.* +import org.mockito.Mockito.* /** * Unit test for [DeletePostCommand]. diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/DeleteReplyCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/DeleteReplyCommandTest.kt index 41a4c02..ca6ec9d 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/DeleteReplyCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/DeleteReplyCommandTest.kt @@ -1,14 +1,12 @@ package net.pterodactylus.sone.fcp -import com.google.common.base.Optional.of -import net.pterodactylus.sone.core.Core -import net.pterodactylus.sone.data.PostReply -import net.pterodactylus.sone.test.mock -import net.pterodactylus.sone.test.whenever -import org.hamcrest.MatcherAssert.assertThat -import org.hamcrest.Matchers.equalTo -import org.junit.Test -import org.mockito.Mockito.verify +import net.pterodactylus.sone.core.* +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.test.* +import org.hamcrest.MatcherAssert.* +import org.hamcrest.Matchers.* +import org.junit.* +import org.mockito.Mockito.* /** * Unit test for [DeleteReplyCommand]. diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/LikePostCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/LikePostCommandTest.kt index 20358c6..7041f25 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/LikePostCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/LikePostCommandTest.kt @@ -1,16 +1,12 @@ package net.pterodactylus.sone.fcp -import net.pterodactylus.sone.core.Core -import net.pterodactylus.sone.data.Sone -import net.pterodactylus.sone.freenet.fcp.FcpException -import net.pterodactylus.sone.test.mock -import net.pterodactylus.sone.test.whenever -import net.pterodactylus.sone.utils.asOptional -import org.hamcrest.MatcherAssert.assertThat -import org.hamcrest.Matchers.equalTo -import org.junit.Before -import org.junit.Test -import org.mockito.Mockito.verify +import net.pterodactylus.sone.core.* +import net.pterodactylus.sone.freenet.fcp.* +import net.pterodactylus.sone.test.* +import org.hamcrest.MatcherAssert.* +import org.hamcrest.Matchers.* +import org.junit.* +import org.mockito.Mockito.* /** * Unit test for [LikePostCommand]. diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/LikeReplyCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/LikeReplyCommandTest.kt index e0df020..0d0579a 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/LikeReplyCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/LikeReplyCommandTest.kt @@ -1,17 +1,12 @@ package net.pterodactylus.sone.fcp -import net.pterodactylus.sone.core.Core -import net.pterodactylus.sone.data.Post -import net.pterodactylus.sone.data.Sone -import net.pterodactylus.sone.freenet.fcp.FcpException -import net.pterodactylus.sone.test.mock -import net.pterodactylus.sone.test.whenever -import net.pterodactylus.sone.utils.asOptional -import org.hamcrest.MatcherAssert.assertThat -import org.hamcrest.Matchers.equalTo -import org.junit.Before -import org.junit.Test -import org.mockito.Mockito.verify +import net.pterodactylus.sone.core.* +import net.pterodactylus.sone.freenet.fcp.* +import net.pterodactylus.sone.test.* +import org.hamcrest.MatcherAssert.* +import org.hamcrest.Matchers.* +import org.junit.* +import org.mockito.Mockito.* /** * Unit test for [LikeReplyCommand]. diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt index de92612..91eabf5 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt @@ -1,22 +1,15 @@ package net.pterodactylus.sone.fcp -import com.google.common.base.Optional.absent -import freenet.support.SimpleFieldSet -import net.pterodactylus.sone.core.Core -import net.pterodactylus.sone.data.Post -import net.pterodactylus.sone.data.PostReply -import net.pterodactylus.sone.data.Profile -import net.pterodactylus.sone.data.Sone -import net.pterodactylus.sone.freenet.fcp.FcpException -import net.pterodactylus.sone.template.SoneAccessor -import net.pterodactylus.sone.test.OneByOneMatcher -import net.pterodactylus.sone.test.mock -import net.pterodactylus.sone.test.whenever -import net.pterodactylus.sone.utils.asOptional -import org.junit.Before -import org.junit.Rule -import org.junit.rules.ExpectedException -import org.mockito.ArgumentMatchers.anyString +import freenet.support.* +import net.pterodactylus.sone.core.* +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.freenet.fcp.* +import net.pterodactylus.sone.template.* +import net.pterodactylus.sone.test.* +import net.pterodactylus.sone.utils.* +import org.junit.* +import org.junit.rules.* +import org.mockito.ArgumentMatchers.* /** * Base class for Sone FCP command tests. diff --git a/src/test/kotlin/net/pterodactylus/sone/web/ajax/BookmarkAjaxPageTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/ajax/BookmarkAjaxPageTest.kt index 00de556..801ea28 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/ajax/BookmarkAjaxPageTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/ajax/BookmarkAjaxPageTest.kt @@ -1,12 +1,11 @@ package net.pterodactylus.sone.web.ajax -import net.pterodactylus.sone.data.Post -import net.pterodactylus.sone.test.getInstance -import net.pterodactylus.sone.web.baseInjector -import org.hamcrest.MatcherAssert.assertThat -import org.hamcrest.Matchers.equalTo -import org.hamcrest.Matchers.notNullValue -import org.junit.Test +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.test.* +import net.pterodactylus.sone.web.* +import org.hamcrest.MatcherAssert.* +import org.hamcrest.Matchers.* +import org.junit.* import org.mockito.ArgumentMatchers.any import org.mockito.Mockito.never import org.mockito.Mockito.verify diff --git a/src/test/kotlin/net/pterodactylus/sone/web/ajax/DeletePostAjaxPageTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/ajax/DeletePostAjaxPageTest.kt index 6db74c0..5ad9531 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/ajax/DeletePostAjaxPageTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/ajax/DeletePostAjaxPageTest.kt @@ -1,16 +1,12 @@ package net.pterodactylus.sone.web.ajax -import net.pterodactylus.sone.data.Post -import net.pterodactylus.sone.data.Sone -import net.pterodactylus.sone.test.getInstance -import net.pterodactylus.sone.test.mock -import net.pterodactylus.sone.test.whenever -import net.pterodactylus.sone.web.baseInjector -import org.hamcrest.MatcherAssert.assertThat -import org.hamcrest.Matchers.equalTo -import org.hamcrest.Matchers.notNullValue -import org.junit.Test -import org.mockito.Mockito.verify +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.test.* +import net.pterodactylus.sone.web.* +import org.hamcrest.MatcherAssert.* +import org.hamcrest.Matchers.* +import org.junit.* +import org.mockito.Mockito.* /** * Unit test for [DeletePostAjaxPage]. diff --git a/src/test/kotlin/net/pterodactylus/sone/web/ajax/DeleteProfileFieldAjaxPageTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/ajax/DeleteProfileFieldAjaxPageTest.kt index ac1da09..9e4a8e0 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/ajax/DeleteProfileFieldAjaxPageTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/ajax/DeleteProfileFieldAjaxPageTest.kt @@ -1,13 +1,11 @@ package net.pterodactylus.sone.web.ajax -import net.pterodactylus.sone.test.getInstance -import net.pterodactylus.sone.web.baseInjector -import org.hamcrest.MatcherAssert.assertThat -import org.hamcrest.Matchers.equalTo -import org.hamcrest.Matchers.notNullValue -import org.hamcrest.Matchers.nullValue -import org.junit.Test -import org.mockito.Mockito.verify +import net.pterodactylus.sone.test.* +import net.pterodactylus.sone.web.* +import org.hamcrest.MatcherAssert.* +import org.hamcrest.Matchers.* +import org.junit.* +import org.mockito.Mockito.* /** * Unit test for [DeleteProfileFieldAjaxPage]. diff --git a/src/test/kotlin/net/pterodactylus/sone/web/ajax/DeleteReplyAjaxPageTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/ajax/DeleteReplyAjaxPageTest.kt index 6f580c6..0f765dc 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/ajax/DeleteReplyAjaxPageTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/ajax/DeleteReplyAjaxPageTest.kt @@ -1,16 +1,12 @@ package net.pterodactylus.sone.web.ajax -import net.pterodactylus.sone.data.PostReply -import net.pterodactylus.sone.data.Sone -import net.pterodactylus.sone.test.getInstance -import net.pterodactylus.sone.test.mock -import net.pterodactylus.sone.test.whenever -import net.pterodactylus.sone.web.baseInjector -import org.hamcrest.MatcherAssert.assertThat -import org.hamcrest.Matchers.equalTo -import org.hamcrest.Matchers.notNullValue -import org.junit.Test -import org.mockito.Mockito.verify +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.test.* +import net.pterodactylus.sone.web.* +import org.hamcrest.MatcherAssert.* +import org.hamcrest.Matchers.* +import org.junit.* +import org.mockito.Mockito.* /** * Unit test for [DeleteReplyAjaxPage]. diff --git a/src/test/kotlin/net/pterodactylus/sone/web/ajax/DismissNotificationAjaxPageTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/ajax/DismissNotificationAjaxPageTest.kt index 72e048e..a43a742 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/ajax/DismissNotificationAjaxPageTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/ajax/DismissNotificationAjaxPageTest.kt @@ -1,15 +1,12 @@ package net.pterodactylus.sone.web.ajax -import net.pterodactylus.sone.test.getInstance -import net.pterodactylus.sone.test.mock -import net.pterodactylus.sone.test.whenever -import net.pterodactylus.sone.web.baseInjector -import net.pterodactylus.util.notify.Notification -import org.hamcrest.MatcherAssert.assertThat -import org.hamcrest.Matchers.equalTo -import org.hamcrest.Matchers.notNullValue -import org.junit.Test -import org.mockito.Mockito.verify +import net.pterodactylus.sone.test.* +import net.pterodactylus.sone.web.* +import net.pterodactylus.util.notify.* +import org.hamcrest.MatcherAssert.* +import org.hamcrest.Matchers.* +import org.junit.* +import org.mockito.Mockito.* /** * Unit test for [DismissNotificationAjaxPage]. diff --git a/src/test/kotlin/net/pterodactylus/sone/web/ajax/FollowSoneAjaxPageTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/ajax/FollowSoneAjaxPageTest.kt index 2d9917c..cd4a932 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/ajax/FollowSoneAjaxPageTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/ajax/FollowSoneAjaxPageTest.kt @@ -1,15 +1,12 @@ package net.pterodactylus.sone.web.ajax -import net.pterodactylus.sone.data.Sone -import net.pterodactylus.sone.test.getInstance -import net.pterodactylus.sone.test.mock -import net.pterodactylus.sone.test.whenever -import net.pterodactylus.sone.web.baseInjector -import org.hamcrest.MatcherAssert.assertThat -import org.hamcrest.Matchers.equalTo -import org.hamcrest.Matchers.notNullValue -import org.junit.Test -import org.mockito.Mockito.verify +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.test.* +import net.pterodactylus.sone.web.* +import org.hamcrest.MatcherAssert.* +import org.hamcrest.Matchers.* +import org.junit.* +import org.mockito.Mockito.* /** * Unit test for [FollowSoneAjaxPage]. diff --git a/src/test/kotlin/net/pterodactylus/sone/web/ajax/LockSoneAjaxPageTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/ajax/LockSoneAjaxPageTest.kt index ff44cc4..e3fe5c6 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/ajax/LockSoneAjaxPageTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/ajax/LockSoneAjaxPageTest.kt @@ -1,14 +1,12 @@ package net.pterodactylus.sone.web.ajax -import net.pterodactylus.sone.data.Sone -import net.pterodactylus.sone.test.getInstance -import net.pterodactylus.sone.test.mock -import net.pterodactylus.sone.web.baseInjector -import org.hamcrest.MatcherAssert.assertThat -import org.hamcrest.Matchers.equalTo -import org.hamcrest.Matchers.notNullValue -import org.junit.Test -import org.mockito.Mockito.verify +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.test.* +import net.pterodactylus.sone.web.* +import org.hamcrest.MatcherAssert.* +import org.hamcrest.Matchers.* +import org.junit.* +import org.mockito.Mockito.* /** * Unit test for [LockSoneAjaxPage]. diff --git a/src/test/kotlin/net/pterodactylus/sone/web/ajax/MarkAsKnownAjaxPageTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/ajax/MarkAsKnownAjaxPageTest.kt index 6ed2326..9c37a3d 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/ajax/MarkAsKnownAjaxPageTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/ajax/MarkAsKnownAjaxPageTest.kt @@ -1,19 +1,12 @@ package net.pterodactylus.sone.web.ajax -import net.pterodactylus.sone.data.Post -import net.pterodactylus.sone.data.PostReply -import net.pterodactylus.sone.data.Sone -import net.pterodactylus.sone.test.getInstance -import net.pterodactylus.sone.test.mock -import net.pterodactylus.sone.test.whenever -import net.pterodactylus.sone.web.baseInjector -import org.hamcrest.MatcherAssert.assertThat -import org.hamcrest.Matchers.equalTo -import org.hamcrest.Matchers.notNullValue -import org.junit.Test -import org.mockito.Mockito.any -import org.mockito.Mockito.never -import org.mockito.Mockito.verify +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.test.* +import net.pterodactylus.sone.web.* +import org.hamcrest.MatcherAssert.* +import org.hamcrest.Matchers.* +import org.junit.* +import org.mockito.Mockito.* /** * Unit test for [MarkAsKnownAjaxPage]. diff --git a/src/test/kotlin/net/pterodactylus/sone/web/ajax/UnfollowSoneAjaxPageTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/ajax/UnfollowSoneAjaxPageTest.kt index 9e1be0b..788a398 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/ajax/UnfollowSoneAjaxPageTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/ajax/UnfollowSoneAjaxPageTest.kt @@ -1,15 +1,12 @@ package net.pterodactylus.sone.web.ajax -import net.pterodactylus.sone.data.Sone -import net.pterodactylus.sone.test.getInstance -import net.pterodactylus.sone.test.mock -import net.pterodactylus.sone.test.whenever -import net.pterodactylus.sone.web.baseInjector -import org.hamcrest.MatcherAssert.assertThat -import org.hamcrest.Matchers.equalTo -import org.hamcrest.Matchers.notNullValue -import org.junit.Test -import org.mockito.Mockito.verify +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.test.* +import net.pterodactylus.sone.web.* +import org.hamcrest.MatcherAssert.* +import org.hamcrest.Matchers.* +import org.junit.* +import org.mockito.Mockito.* /** * Unit test for [UnfollowSoneAjaxPage]. diff --git a/src/test/kotlin/net/pterodactylus/sone/web/ajax/UnlockSoneAjaxPageTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/ajax/UnlockSoneAjaxPageTest.kt index 6d28670..bce6db1 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/ajax/UnlockSoneAjaxPageTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/ajax/UnlockSoneAjaxPageTest.kt @@ -1,14 +1,12 @@ package net.pterodactylus.sone.web.ajax -import net.pterodactylus.sone.data.Sone -import net.pterodactylus.sone.test.getInstance -import net.pterodactylus.sone.test.mock -import net.pterodactylus.sone.web.baseInjector -import org.hamcrest.MatcherAssert.assertThat -import org.hamcrest.Matchers.equalTo -import org.hamcrest.Matchers.notNullValue -import org.junit.Test -import org.mockito.Mockito.verify +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.test.* +import net.pterodactylus.sone.web.* +import org.hamcrest.MatcherAssert.* +import org.hamcrest.Matchers.* +import org.junit.* +import org.mockito.Mockito.* /** * Unit test for [UnlockSoneAjaxPage]. diff --git a/src/test/kotlin/net/pterodactylus/sone/web/ajax/UntrustAjaxPageTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/ajax/UntrustAjaxPageTest.kt index 6421c09..b693194 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/ajax/UntrustAjaxPageTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/ajax/UntrustAjaxPageTest.kt @@ -1,15 +1,12 @@ package net.pterodactylus.sone.web.ajax -import net.pterodactylus.sone.data.Sone -import net.pterodactylus.sone.test.getInstance -import net.pterodactylus.sone.test.mock -import net.pterodactylus.sone.web.baseInjector -import org.hamcrest.MatcherAssert.assertThat -import org.hamcrest.Matchers.equalTo -import org.hamcrest.Matchers.notNullValue -import org.hamcrest.Matchers.nullValue -import org.junit.Test -import org.mockito.Mockito.verify +import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.test.* +import net.pterodactylus.sone.web.* +import org.hamcrest.MatcherAssert.* +import org.hamcrest.Matchers.* +import org.junit.* +import org.mockito.Mockito.* /** * Unit test for [UntrustAjaxPage]. -- 2.7.4