Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Velin92 committed Sep 27, 2024
1 parent 4b2029c commit 7519524
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions RiotTests/UserSessionsDataProviderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -166,45 +166,13 @@ private class MockSession: MXSession {
let canCrossSign: Bool
override var myDeviceId: String! { .currentDevice }

override var crypto: MXCrypto! {
get { MockCrypto(canCrossSign: canCrossSign) }
set { }
}

init(canCrossSign: Bool) {
self.canCrossSign = canCrossSign
super.init()
}

}

/// A mock `MXCrypto` that can override the `canCrossSign` state.
private class MockCrypto: MXLegacyCrypto {
let canCrossSign: Bool
override var crossSigning: MXCrossSigning { MockCrossSigning(canCrossSign: canCrossSign) }

init(canCrossSign: Bool) {
self.canCrossSign = canCrossSign
super.init()
}

}

/// A mock `MXCrossSigning` with an overridden `canCrossSign` property.
private class MockCrossSigning: MXLegacyCrossSigning {
let canCrossSignMock: Bool
override var canCrossSign: Bool { canCrossSignMock }

init(canCrossSign: Bool) {
self.canCrossSignMock = canCrossSign
super.init()
}

override var state: MXCrossSigningState {
.crossSigningExists
}
}

/// A mock `MXDeviceInfo` that can override the `isVerified` state.
private class MockDeviceInfo: MXDeviceInfo {
private let verified: Bool
Expand Down

0 comments on commit 7519524

Please sign in to comment.