-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
ViewModel tests are generating incorrect references to the repositories. Example:
package com.awesomeapp.analytics
import org.junit.Test
import org.junit.Before
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
import org.junit.Rule
import kotlinx.coroutines.test.runTest
import kotlinx.coroutines.ExperimentalCoroutinesApi
import org.junit.Assert.*
import kotlin.test.assertTrue
import kotlin.test.assertNotNull
import kotlin.test.assertEquals
import kotlin.test.assertFalse
import com.awesomeapp.analytics.*
@OptIn(ExperimentalCoroutinesApi::class)
class Viewmodel23_1Test {
private lateinit var repository0: Repository12_5
private lateinit var viewModel: Viewmodel23_1
@Before
fun setup() {
repository0 = Repository12_5(com.awesomeapp.profile.Api8_6(), com.awesomeapp.identity.Api4_6())
viewModel = Viewmodel23_1(
repository0
)
}
@Test
fun `test state updates with data`() = runTest {
assertNotNull(viewModel.state.value)
}
}
Metadata
Metadata
Assignees
Labels
No labels