@@ -46,6 +46,7 @@ class SharedSecureStorageViewModelTest {
4646
4747 private val stringProvider = FakeStringProvider ()
4848 private val session = FakeSession ()
49+ val args = SharedSecureStorageActivity .Args (keyId = null , emptyList(), " alias" )
4950
5051 @Test
5152 fun `given a key info with passphrase when initialising then step is EnterPassphrase` () {
@@ -123,14 +124,15 @@ class SharedSecureStorageViewModelTest {
123124 test.assertEvents(SharedSecureStorageViewEvent .Dismiss )
124125 }
125126
126- private fun createViewModel () = SharedSecureStorageViewModel (
127- SharedSecureStorageViewState (),
128- SharedSecureStorageActivity .Args (keyId = null , emptyList(), " alias" ),
129- stringProvider.instance,
130- session
131- )
127+ private fun createViewModel (): SharedSecureStorageViewModel {
128+ return SharedSecureStorageViewModel (
129+ SharedSecureStorageViewState (args),
130+ stringProvider.instance,
131+ session
132+ )
133+ }
132134
133- private fun aViewState (hasPassphrase : Boolean , step : SharedSecureStorageViewState .Step ) = SharedSecureStorageViewState (
135+ private fun aViewState (hasPassphrase : Boolean , step : SharedSecureStorageViewState .Step ) = SharedSecureStorageViewState (args).copy(
134136 ready = true ,
135137 hasPassphrase = hasPassphrase,
136138 checkingSSSSAction = Uninitialized ,
0 commit comments