Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72e3ee3a authored by cketti's avatar cketti
Browse files

Clean up `DependencyInjectionTest`

parent 03189fae
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
package com.fsck.k9

import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import com.fsck.k9.ui.changelog.ChangeLogMode
import com.fsck.k9.ui.changelog.ChangelogViewModel
@@ -26,10 +25,10 @@ import org.robolectric.annotation.Config
@RunWith(RobolectricTestRunner::class)
@Config(application = App::class)
class DependencyInjectionTest : AutoCloseKoinTest() {
    val lifecycleOwner = mock<LifecycleOwner> {
        on { lifecycle } doReturn mock<Lifecycle>()
    private val lifecycleOwner = mock<LifecycleOwner> {
        on { lifecycle } doReturn mock()
    }
    val autocryptTransferView = mock<AutocryptKeyTransferActivity>()
    private val autocryptTransferView = mock<AutocryptKeyTransferActivity>()

    @KoinInternalApi
    @Test
@@ -38,7 +37,7 @@ class DependencyInjectionTest : AutoCloseKoinTest() {

        getKoin().checkModules {
            withParameter<OpenPgpApiManager> { lifecycleOwner }
            create<AutocryptKeyTransferPresenter> { parametersOf(lifecycleOwner, autocryptTransferView) }
            withParameters<AutocryptKeyTransferPresenter> { parametersOf(lifecycleOwner, autocryptTransferView) }
            withParameter<FolderNameFormatter> { RuntimeEnvironment.getApplication() }
            withParameter<SizeFormatter> { RuntimeEnvironment.getApplication() }
            withParameter<ChangelogViewModel> { ChangeLogMode.CHANGE_LOG }