Using Assert from Junit5 instead of Junit4

This commit is contained in:
2021-09-09 01:50:04 +02:00
parent c07cf85ce5
commit 9684c96610
4 changed files with 9 additions and 9 deletions
@@ -15,7 +15,7 @@ import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.test.TestCoroutineDispatcher
import kotlinx.coroutines.test.TestCoroutineScope
import kotlinx.coroutines.test.runBlockingTest
import org.junit.Assert.assertEquals
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith
@@ -14,7 +14,7 @@ import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.test.TestCoroutineDispatcher
import kotlinx.coroutines.test.TestCoroutineScope
import kotlinx.coroutines.test.runBlockingTest
import org.junit.Assert
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith
@@ -57,7 +57,7 @@ class BlogRepositoryTest(
coEvery { localDataSource.save(any()) } just Runs
blogRepository.findAll().collect {
Assert.assertEquals(it.data, PreviewData.Blog.data)
assertEquals(it.data, PreviewData.Blog.data)
}
verify(exactly = 1) { remoteDataSource.findAll() }
@@ -14,7 +14,7 @@ import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.test.TestCoroutineDispatcher
import kotlinx.coroutines.test.TestCoroutineScope
import kotlinx.coroutines.test.runBlockingTest
import org.junit.Assert
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith
@@ -57,7 +57,7 @@ class LottieFileRepositoryTest(
coEvery { localDataSource.save(any()) } just Runs
repository.findFeatured().collect {
Assert.assertEquals(it.data, PreviewData.Lottiefile.data)
assertEquals(it.data, PreviewData.Lottiefile.data)
}
verify(exactly = 1) { remoteDataSource.findFeatured() }
@@ -73,7 +73,7 @@ class LottieFileRepositoryTest(
coEvery { localDataSource.save(any()) } just Runs
repository.findRecent().collect {
Assert.assertEquals(it.data, PreviewData.Lottiefile.data)
assertEquals(it.data, PreviewData.Lottiefile.data)
}
verify(exactly = 1) { remoteDataSource.findRecent() }
@@ -89,7 +89,7 @@ class LottieFileRepositoryTest(
coEvery { localDataSource.save(any()) } just Runs
repository.findPopular().collect {
Assert.assertEquals(it.data, PreviewData.Lottiefile.data)
assertEquals(it.data, PreviewData.Lottiefile.data)
}
verify(exactly = 1) { remoteDataSource.findPopular() }
@@ -14,7 +14,7 @@ import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.test.TestCoroutineDispatcher
import kotlinx.coroutines.test.TestCoroutineScope
import kotlinx.coroutines.test.runBlockingTest
import org.junit.Assert
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith
@@ -47,7 +47,7 @@ class UserRepositoryTest(
every { localDataSource.findAll() } returns flowOf(Result.Success(PreviewData.User.data))
repository.findAll().collect {
Assert.assertEquals(it.data, PreviewData.User.data)
assertEquals(it.data, PreviewData.User.data)
}
verify(exactly = 1) { localDataSource.findAll() }