removing unused fake helper methods
This commit is contained in:
parent
d514751ffd
commit
ba76aac965
@ -27,13 +27,6 @@ class FakeRegisterActionHandler {
|
||||
|
||||
val instance = mockk<RegistrationActionHandler>()
|
||||
|
||||
fun givenResultFor(wizard: RegistrationWizard, action: RegisterAction, result: RegistrationResult) {
|
||||
coEvery { instance.handleRegisterAction(wizard, action) } answers { call ->
|
||||
call.invocation.args.first()
|
||||
result
|
||||
}
|
||||
}
|
||||
|
||||
fun givenResultsFor(wizard: RegistrationWizard, result: List<Pair<RegisterAction, RegistrationResult>>) {
|
||||
coEvery { instance.handleRegisterAction(wizard, any()) } answers { call ->
|
||||
val actionArg = call.invocation.args[1] as RegisterAction
|
||||
|
@ -24,15 +24,7 @@ import org.matrix.android.sdk.api.session.Session
|
||||
|
||||
class FakeRegistrationWizard : RegistrationWizard by mockk() {
|
||||
|
||||
fun givenSuccessfulDummy(session: Session) {
|
||||
givenSuccessFor(session) { dummy() }
|
||||
}
|
||||
|
||||
fun givenSuccessFor(result: Session, expect: suspend RegistrationWizard.() -> RegistrationResult) {
|
||||
coEvery { expect(this@FakeRegistrationWizard) } returns RegistrationResult.Success(result)
|
||||
}
|
||||
|
||||
fun givenSuccessfulAcceptTerms(session: Session) {
|
||||
coEvery { acceptTerms() } returns RegistrationResult.Success(session)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user