From b243a937825778cf227fa58bdb1d087575504206 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Mon, 31 Oct 2022 22:33:55 +0000 Subject: [PATCH] removing dummy file --- .../app/dapk/st/messenger/ImplBarTest.kt | 41 ------------------- 1 file changed, 41 deletions(-) delete mode 100644 features/messenger/src/test/kotlin/app/dapk/st/messenger/ImplBarTest.kt diff --git a/features/messenger/src/test/kotlin/app/dapk/st/messenger/ImplBarTest.kt b/features/messenger/src/test/kotlin/app/dapk/st/messenger/ImplBarTest.kt deleted file mode 100644 index c5b1926..0000000 --- a/features/messenger/src/test/kotlin/app/dapk/st/messenger/ImplBarTest.kt +++ /dev/null @@ -1,41 +0,0 @@ -package app.dapk.st.messenger - -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.flow.flowOf -import kotlinx.coroutines.flow.launchIn -import kotlinx.coroutines.flow.onEach -import kotlinx.coroutines.runBlocking -import kotlinx.coroutines.test.UnconfinedTestDispatcher -import org.junit.Test - -class ImplBarTest { - - @Test - fun `test bar`() { - val viewModelScope = CoroutineScope(UnconfinedTestDispatcher()) - val reducer = FooBar.createReducer( - initialState = ImplBar.BankState(amount = 0), - FooBar.sideEffect(ImplBar.BankAction::class) { action, state -> - println("SE ${action::class.simpleName} $state") - }, - FooBar.sideEffect(ImplBar.BankAction.Foo::class) { action, state -> - println("FOO - $action $state") - }, - FooBar.change(ImplBar.BankAction.Increment::class) { _, state -> - state.copy(amount = state.amount + 1) - }, - FooBar.async(ImplBar.BankAction.MultiInc::class) { _ -> - flowOf(0, 1, 2) - .onEach { dispatch(ImplBar.BankAction.Increment) } - .launchIn(coroutineScope) - }, - ) - - val store = FooBar.createStore(reducer, viewModelScope) - store.subscribe { - println(it) - } - runBlocking { store.dispatch(ImplBar.BankAction.Inc) } - } - -} \ No newline at end of file