Skip to content

Commit 42b38e8

Browse files
committed
Refactor: Replace mockito star import with more specific when import
Also, as part of this commit, a few other minor warnings got resolved too.
1 parent 6cc1d05 commit 42b38e8

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

WordPress/src/test/java/org/wordpress/android/ui/comments/usecases/ModerateCommentsWithUndoUseCaseTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import org.assertj.core.api.Assertions.assertThat
1515
import org.junit.Before
1616
import org.junit.Test
1717
import org.mockito.Mock
18-
import org.mockito.Mockito.*
18+
import org.mockito.Mockito.`when`
1919
import org.wordpress.android.BaseUnitTest
2020
import org.wordpress.android.fluxc.model.CommentStatus.APPROVED
2121
import org.wordpress.android.fluxc.model.CommentStatus.DELETED

WordPress/src/test/java/org/wordpress/android/ui/comments/usecases/PaginateCommentsUseCaseTest.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import org.assertj.core.api.Assertions.assertThat
1313
import org.junit.Before
1414
import org.junit.Test
1515
import org.mockito.Mock
16-
import org.mockito.Mockito.*
16+
import org.mockito.Mockito.`when`
1717
import org.wordpress.android.BaseUnitTest
1818
import org.wordpress.android.fluxc.model.SiteModel
1919
import org.wordpress.android.fluxc.store.CommentStore.CommentError
@@ -127,7 +127,7 @@ class PaginateCommentsUseCaseTest : BaseUnitTest() {
127127

128128
val commentsPayload = dataResult.data
129129

130-
assertThat(commentsPayload.hasMore).isTrue()
130+
assertThat(commentsPayload.hasMore).isTrue
131131
assertThat(commentsPayload.comments).isEqualTo(testComments.take(30))
132132
job.cancel()
133133
}
@@ -152,7 +152,7 @@ class PaginateCommentsUseCaseTest : BaseUnitTest() {
152152

153153
val commentsPayload = dataResult.data
154154

155-
assertThat(commentsPayload.hasMore).isTrue()
155+
assertThat(commentsPayload.hasMore).isTrue
156156
assertThat(commentsPayload.comments).isEqualTo(testComments.take(60))
157157
job.cancel()
158158
}
@@ -177,7 +177,7 @@ class PaginateCommentsUseCaseTest : BaseUnitTest() {
177177

178178
val commentsPayload = dataResult.data
179179

180-
assertThat(commentsPayload.hasMore).isFalse()
180+
assertThat(commentsPayload.hasMore).isFalse
181181
assertThat(commentsPayload.comments).isEqualTo(testComments.take(90))
182182
job.cancel()
183183
}
@@ -214,7 +214,7 @@ class PaginateCommentsUseCaseTest : BaseUnitTest() {
214214

215215
paginateCommentsUseCase.manageAction(OnGetPage(GetPageParameters(site, 30, 30, ALL)))
216216

217-
assertThat(result.any { it is UseCaseResult.Loading }).isFalse()
217+
assertThat(result.any { it is UseCaseResult.Loading }).isFalse
218218
job.cancel()
219219
}
220220

@@ -362,7 +362,7 @@ class PaginateCommentsUseCaseTest : BaseUnitTest() {
362362
)
363363
)
364364

365-
assertThat(result.any { it is UseCaseResult.Loading }).isFalse()
365+
assertThat(result.any { it is UseCaseResult.Loading }).isFalse
366366

367367
job.cancel()
368368
}
@@ -399,7 +399,7 @@ class PaginateCommentsUseCaseTest : BaseUnitTest() {
399399

400400
val commentsPayload = dataResult.data
401401

402-
assertThat(commentsPayload.hasMore).isTrue()
402+
assertThat(commentsPayload.hasMore).isTrue
403403
assertThat(commentsPayload.comments).isEqualTo(testComments.take(60))
404404
job.cancel()
405405
}

0 commit comments

Comments
 (0)