|
|
@ -4,17 +4,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
package org.mozilla.fenix.gleanplumb
|
|
|
|
package org.mozilla.fenix.gleanplumb
|
|
|
|
|
|
|
|
|
|
|
|
import io.mockk.every
|
|
|
|
|
|
|
|
import io.mockk.mockkObject
|
|
|
|
|
|
|
|
import io.mockk.spyk
|
|
|
|
import io.mockk.spyk
|
|
|
|
import io.mockk.unmockkObject
|
|
|
|
|
|
|
|
import io.mockk.verify
|
|
|
|
import io.mockk.verify
|
|
|
|
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
|
|
|
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
|
|
|
import mozilla.components.support.test.rule.MainCoroutineRule
|
|
|
|
import mozilla.components.support.test.rule.MainCoroutineRule
|
|
|
|
import org.junit.Rule
|
|
|
|
import org.junit.Rule
|
|
|
|
import org.junit.Test
|
|
|
|
import org.junit.Test
|
|
|
|
import org.mozilla.fenix.Config
|
|
|
|
|
|
|
|
import org.mozilla.fenix.FeatureFlags
|
|
|
|
|
|
|
|
import org.mozilla.fenix.components.AppStore
|
|
|
|
import org.mozilla.fenix.components.AppStore
|
|
|
|
import org.mozilla.fenix.components.appstate.AppAction.MessagingAction
|
|
|
|
import org.mozilla.fenix.components.appstate.AppAction.MessagingAction
|
|
|
|
|
|
|
|
|
|
|
@ -28,13 +23,8 @@ class MessagingFeatureTest {
|
|
|
|
val store: AppStore = spyk(AppStore())
|
|
|
|
val store: AppStore = spyk(AppStore())
|
|
|
|
val binding = MessagingFeature(store)
|
|
|
|
val binding = MessagingFeature(store)
|
|
|
|
|
|
|
|
|
|
|
|
mockkObject(FeatureFlags)
|
|
|
|
|
|
|
|
every { FeatureFlags.messagingFeature } returns true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
binding.start()
|
|
|
|
binding.start()
|
|
|
|
|
|
|
|
|
|
|
|
verify { store.dispatch(MessagingAction.Evaluate) }
|
|
|
|
verify { store.dispatch(MessagingAction.Evaluate) }
|
|
|
|
|
|
|
|
|
|
|
|
unmockkObject(Config)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|