1
0
Fork 0
fenix/app/src/test/java/org/mozilla/fenix/settings/logins/SavedLoginsInteractorTest.kt

30 lines
827 B
Kotlin
Raw Normal View History

2019-10-24 18:29:41 +02:00
/* This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings.logins
2019-10-24 18:29:41 +02:00
import io.mockk.mockk
import io.mockk.verify
import org.junit.Test
class SavedLoginsInteractorTest {
@Test
fun itemClicked() {
val savedLoginClicked: (SavedLoginsItem) -> Unit = mockk(relaxed = true)
val learnMore: () -> Unit = mockk(relaxed = true)
2019-10-24 18:29:41 +02:00
val interactor = SavedLoginsInteractor(
savedLoginClicked,
learnMore
2019-10-24 18:29:41 +02:00
)
val item = SavedLoginsItem("mozilla.org", "username", "password")
interactor.itemClicked(item)
verify {
savedLoginClicked.invoke(item)
}
}
}