Skip to content

Commit

Permalink
Delete @ExperimentalCoroutinesApi annotation from runTest API
Browse files Browse the repository at this point in the history
  • Loading branch information
kym1924 committed May 7, 2023
1 parent 0bd1edf commit bcb099f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import com.kimym.marvel.data.repository.RatingRepository
import com.kimym.marvel.ui.main.MainActivity
import dagger.hilt.android.testing.HiltAndroidRule
import dagger.hilt.android.testing.HiltAndroidTest
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.firstOrNull
import kotlinx.coroutines.test.runTest
import org.hamcrest.CoreMatchers.not
Expand Down Expand Up @@ -71,7 +70,6 @@ class DetailFragmentTest {
assertEquals(navController.currentDestination?.id, R.id.movieFragment)
}

@ExperimentalCoroutinesApi
@Test
fun testFloatingActionButtonIsDisplayedWhenRatingDoesNotExist() = runTest {
when (repository.getRating(TITLE).firstOrNull()) {
Expand All @@ -80,7 +78,6 @@ class DetailFragmentTest {
}
}

@ExperimentalCoroutinesApi
@Test
fun testRatingBarIsDisplayedWhenRatingIsExists() = runTest {
when (repository.getRating(TITLE).firstOrNull()) {
Expand All @@ -89,7 +86,6 @@ class DetailFragmentTest {
}
}

@ExperimentalCoroutinesApi
@Test
fun testFloatingActionButtonClickToNavigateRatingDialogWhenRatingDoesNotExist() = runTest {
when (repository.getRating(TITLE).firstOrNull()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import com.kimym.marvel.data.repository.FavoriteRepository
import com.kimym.marvel.ui.main.MainActivity
import dagger.hilt.android.testing.HiltAndroidRule
import dagger.hilt.android.testing.HiltAndroidTest
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.test.runTest
import org.junit.Before
Expand Down Expand Up @@ -55,7 +54,6 @@ class FavoriteFragmentTest {
}
}

@ExperimentalCoroutinesApi
@Test
fun testEmptyTextForFavoritesIsEmptyOrRecyclerViewForFavoritesIsNotEmpty() = runTest {
when (repository.getFavorites().first().isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import androidx.work.testing.WorkManagerTestInitHelper
import com.kimym.marvel.database.MarvelDao
import dagger.hilt.android.testing.HiltAndroidRule
import dagger.hilt.android.testing.HiltAndroidTest
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runTest
import org.hamcrest.CoreMatchers.`is`
import org.junit.Before
Expand Down Expand Up @@ -41,7 +40,6 @@ class MarvelDatabaseWorkerTest {
WorkManagerTestInitHelper.initializeTestWorkManager(context, config)
}

@ExperimentalCoroutinesApi
@Test
fun marvelDatabaseWorker_doWork_success() = runTest {
val context = InstrumentationRegistry.getInstrumentation().targetContext
Expand Down

0 comments on commit bcb099f

Please sign in to comment.