@@ -4,18 +4,17 @@ import com.terning.core.designsystem.state.UiState
44import com.terning.domain.intern.entity.InternInfo
55import com.terning.domain.intern.repository.InternRepository
66import com.terning.feature.intern.InternViewModel
7- import com.watcha.testing.util.MainDispatcherRule
8- import kotlinx.coroutines.ExperimentalCoroutinesApi
7+ import com.terning.testing.util.MainDispatcherRule
8+ import junit.framework.TestCase.assertEquals
9+ import junit.framework.TestCase.assertTrue
910import kotlinx.coroutines.flow.first
10- import kotlinx.coroutines.test.advanceUntilIdle
1111import kotlinx.coroutines.test.runTest
1212import org.junit.Before
1313import org.junit.Rule
1414import org.junit.Test
1515import org.mockito.Mockito.doReturn
1616import org.mockito.Mockito.mock
1717
18- @OptIn(ExperimentalCoroutinesApi ::class )
1918class InternViewModelTest {
2019
2120 @get:Rule
@@ -55,8 +54,8 @@ class InternViewModelTest {
5554 viewModel.getInternInfo(1 )
5655
5756 val uiState = viewModel.internUiState.first()
58- assert (uiState.loadState is UiState .Success )
59- assert ((uiState.loadState as UiState .Success ).data == mockInternInfo)
57+ assertTrue (uiState.loadState is UiState .Success )
58+ assertEquals ((uiState.loadState as UiState .Success ).data, mockInternInfo)
6059 }
6160
6261}
0 commit comments