|
1 |
| -// Generated using Sourcery 2.2.7 — https://github.com/krzysztofzablocki/Sourcery |
| 1 | +// Generated using Sourcery 2.3.0 — https://github.com/krzysztofzablocki/Sourcery |
2 | 2 | // DO NOT EDIT
|
3 | 3 |
|
4 | 4 | // swiftlint:disable all
|
@@ -8149,6 +8149,75 @@ open class EncryptionSDKMock: MatrixRustSDK.Encryption, @unchecked Sendable {
|
8149 | 8149 | }
|
8150 | 8150 | }
|
8151 | 8151 |
|
| 8152 | + //MARK: - hasDevicesToVerifyAgainst |
| 8153 | + |
| 8154 | + open var hasDevicesToVerifyAgainstThrowableError: Error? |
| 8155 | + var hasDevicesToVerifyAgainstUnderlyingCallsCount = 0 |
| 8156 | + open var hasDevicesToVerifyAgainstCallsCount: Int { |
| 8157 | + get { |
| 8158 | + if Thread.isMainThread { |
| 8159 | + return hasDevicesToVerifyAgainstUnderlyingCallsCount |
| 8160 | + } else { |
| 8161 | + var returnValue: Int? = nil |
| 8162 | + DispatchQueue.main.sync { |
| 8163 | + returnValue = hasDevicesToVerifyAgainstUnderlyingCallsCount |
| 8164 | + } |
| 8165 | + |
| 8166 | + return returnValue! |
| 8167 | + } |
| 8168 | + } |
| 8169 | + set { |
| 8170 | + if Thread.isMainThread { |
| 8171 | + hasDevicesToVerifyAgainstUnderlyingCallsCount = newValue |
| 8172 | + } else { |
| 8173 | + DispatchQueue.main.sync { |
| 8174 | + hasDevicesToVerifyAgainstUnderlyingCallsCount = newValue |
| 8175 | + } |
| 8176 | + } |
| 8177 | + } |
| 8178 | + } |
| 8179 | + open var hasDevicesToVerifyAgainstCalled: Bool { |
| 8180 | + return hasDevicesToVerifyAgainstCallsCount > 0 |
| 8181 | + } |
| 8182 | + |
| 8183 | + var hasDevicesToVerifyAgainstUnderlyingReturnValue: Bool! |
| 8184 | + open var hasDevicesToVerifyAgainstReturnValue: Bool! { |
| 8185 | + get { |
| 8186 | + if Thread.isMainThread { |
| 8187 | + return hasDevicesToVerifyAgainstUnderlyingReturnValue |
| 8188 | + } else { |
| 8189 | + var returnValue: Bool? = nil |
| 8190 | + DispatchQueue.main.sync { |
| 8191 | + returnValue = hasDevicesToVerifyAgainstUnderlyingReturnValue |
| 8192 | + } |
| 8193 | + |
| 8194 | + return returnValue! |
| 8195 | + } |
| 8196 | + } |
| 8197 | + set { |
| 8198 | + if Thread.isMainThread { |
| 8199 | + hasDevicesToVerifyAgainstUnderlyingReturnValue = newValue |
| 8200 | + } else { |
| 8201 | + DispatchQueue.main.sync { |
| 8202 | + hasDevicesToVerifyAgainstUnderlyingReturnValue = newValue |
| 8203 | + } |
| 8204 | + } |
| 8205 | + } |
| 8206 | + } |
| 8207 | + open var hasDevicesToVerifyAgainstClosure: (() async throws -> Bool)? |
| 8208 | + |
| 8209 | + open override func hasDevicesToVerifyAgainst() async throws -> Bool { |
| 8210 | + if let error = hasDevicesToVerifyAgainstThrowableError { |
| 8211 | + throw error |
| 8212 | + } |
| 8213 | + hasDevicesToVerifyAgainstCallsCount += 1 |
| 8214 | + if let hasDevicesToVerifyAgainstClosure = hasDevicesToVerifyAgainstClosure { |
| 8215 | + return try await hasDevicesToVerifyAgainstClosure() |
| 8216 | + } else { |
| 8217 | + return hasDevicesToVerifyAgainstReturnValue |
| 8218 | + } |
| 8219 | + } |
| 8220 | + |
8152 | 8221 | //MARK: - isLastDevice
|
8153 | 8222 |
|
8154 | 8223 | open var isLastDeviceThrowableError: Error?
|
@@ -14289,6 +14358,81 @@ open class RoomSDKMock: MatrixRustSDK.Room, @unchecked Sendable {
|
14289 | 14358 | }
|
14290 | 14359 | }
|
14291 | 14360 |
|
| 14361 | + //MARK: - loadOrFetchEvent |
| 14362 | + |
| 14363 | + open var loadOrFetchEventEventIdThrowableError: Error? |
| 14364 | + var loadOrFetchEventEventIdUnderlyingCallsCount = 0 |
| 14365 | + open var loadOrFetchEventEventIdCallsCount: Int { |
| 14366 | + get { |
| 14367 | + if Thread.isMainThread { |
| 14368 | + return loadOrFetchEventEventIdUnderlyingCallsCount |
| 14369 | + } else { |
| 14370 | + var returnValue: Int? = nil |
| 14371 | + DispatchQueue.main.sync { |
| 14372 | + returnValue = loadOrFetchEventEventIdUnderlyingCallsCount |
| 14373 | + } |
| 14374 | + |
| 14375 | + return returnValue! |
| 14376 | + } |
| 14377 | + } |
| 14378 | + set { |
| 14379 | + if Thread.isMainThread { |
| 14380 | + loadOrFetchEventEventIdUnderlyingCallsCount = newValue |
| 14381 | + } else { |
| 14382 | + DispatchQueue.main.sync { |
| 14383 | + loadOrFetchEventEventIdUnderlyingCallsCount = newValue |
| 14384 | + } |
| 14385 | + } |
| 14386 | + } |
| 14387 | + } |
| 14388 | + open var loadOrFetchEventEventIdCalled: Bool { |
| 14389 | + return loadOrFetchEventEventIdCallsCount > 0 |
| 14390 | + } |
| 14391 | + open var loadOrFetchEventEventIdReceivedEventId: String? |
| 14392 | + open var loadOrFetchEventEventIdReceivedInvocations: [String] = [] |
| 14393 | + |
| 14394 | + var loadOrFetchEventEventIdUnderlyingReturnValue: TimelineEvent! |
| 14395 | + open var loadOrFetchEventEventIdReturnValue: TimelineEvent! { |
| 14396 | + get { |
| 14397 | + if Thread.isMainThread { |
| 14398 | + return loadOrFetchEventEventIdUnderlyingReturnValue |
| 14399 | + } else { |
| 14400 | + var returnValue: TimelineEvent? = nil |
| 14401 | + DispatchQueue.main.sync { |
| 14402 | + returnValue = loadOrFetchEventEventIdUnderlyingReturnValue |
| 14403 | + } |
| 14404 | + |
| 14405 | + return returnValue! |
| 14406 | + } |
| 14407 | + } |
| 14408 | + set { |
| 14409 | + if Thread.isMainThread { |
| 14410 | + loadOrFetchEventEventIdUnderlyingReturnValue = newValue |
| 14411 | + } else { |
| 14412 | + DispatchQueue.main.sync { |
| 14413 | + loadOrFetchEventEventIdUnderlyingReturnValue = newValue |
| 14414 | + } |
| 14415 | + } |
| 14416 | + } |
| 14417 | + } |
| 14418 | + open var loadOrFetchEventEventIdClosure: ((String) async throws -> TimelineEvent)? |
| 14419 | + |
| 14420 | + open override func loadOrFetchEvent(eventId: String) async throws -> TimelineEvent { |
| 14421 | + if let error = loadOrFetchEventEventIdThrowableError { |
| 14422 | + throw error |
| 14423 | + } |
| 14424 | + loadOrFetchEventEventIdCallsCount += 1 |
| 14425 | + loadOrFetchEventEventIdReceivedEventId = eventId |
| 14426 | + DispatchQueue.main.async { |
| 14427 | + self.loadOrFetchEventEventIdReceivedInvocations.append(eventId) |
| 14428 | + } |
| 14429 | + if let loadOrFetchEventEventIdClosure = loadOrFetchEventEventIdClosure { |
| 14430 | + return try await loadOrFetchEventEventIdClosure(eventId) |
| 14431 | + } else { |
| 14432 | + return loadOrFetchEventEventIdReturnValue |
| 14433 | + } |
| 14434 | + } |
| 14435 | + |
14292 | 14436 | //MARK: - markAsRead
|
14293 | 14437 |
|
14294 | 14438 | open var markAsReadReceiptTypeThrowableError: Error?
|
@@ -25317,6 +25461,71 @@ open class TimelineEventSDKMock: MatrixRustSDK.TimelineEvent, @unchecked Sendabl
|
25317 | 25461 | }
|
25318 | 25462 | }
|
25319 | 25463 |
|
| 25464 | + //MARK: - threadRootEventId |
| 25465 | + |
| 25466 | + var threadRootEventIdUnderlyingCallsCount = 0 |
| 25467 | + open var threadRootEventIdCallsCount: Int { |
| 25468 | + get { |
| 25469 | + if Thread.isMainThread { |
| 25470 | + return threadRootEventIdUnderlyingCallsCount |
| 25471 | + } else { |
| 25472 | + var returnValue: Int? = nil |
| 25473 | + DispatchQueue.main.sync { |
| 25474 | + returnValue = threadRootEventIdUnderlyingCallsCount |
| 25475 | + } |
| 25476 | + |
| 25477 | + return returnValue! |
| 25478 | + } |
| 25479 | + } |
| 25480 | + set { |
| 25481 | + if Thread.isMainThread { |
| 25482 | + threadRootEventIdUnderlyingCallsCount = newValue |
| 25483 | + } else { |
| 25484 | + DispatchQueue.main.sync { |
| 25485 | + threadRootEventIdUnderlyingCallsCount = newValue |
| 25486 | + } |
| 25487 | + } |
| 25488 | + } |
| 25489 | + } |
| 25490 | + open var threadRootEventIdCalled: Bool { |
| 25491 | + return threadRootEventIdCallsCount > 0 |
| 25492 | + } |
| 25493 | + |
| 25494 | + var threadRootEventIdUnderlyingReturnValue: String? |
| 25495 | + open var threadRootEventIdReturnValue: String? { |
| 25496 | + get { |
| 25497 | + if Thread.isMainThread { |
| 25498 | + return threadRootEventIdUnderlyingReturnValue |
| 25499 | + } else { |
| 25500 | + var returnValue: String?? = nil |
| 25501 | + DispatchQueue.main.sync { |
| 25502 | + returnValue = threadRootEventIdUnderlyingReturnValue |
| 25503 | + } |
| 25504 | + |
| 25505 | + return returnValue! |
| 25506 | + } |
| 25507 | + } |
| 25508 | + set { |
| 25509 | + if Thread.isMainThread { |
| 25510 | + threadRootEventIdUnderlyingReturnValue = newValue |
| 25511 | + } else { |
| 25512 | + DispatchQueue.main.sync { |
| 25513 | + threadRootEventIdUnderlyingReturnValue = newValue |
| 25514 | + } |
| 25515 | + } |
| 25516 | + } |
| 25517 | + } |
| 25518 | + open var threadRootEventIdClosure: (() -> String?)? |
| 25519 | + |
| 25520 | + open override func threadRootEventId() -> String? { |
| 25521 | + threadRootEventIdCallsCount += 1 |
| 25522 | + if let threadRootEventIdClosure = threadRootEventIdClosure { |
| 25523 | + return threadRootEventIdClosure() |
| 25524 | + } else { |
| 25525 | + return threadRootEventIdReturnValue |
| 25526 | + } |
| 25527 | + } |
| 25528 | + |
25320 | 25529 | //MARK: - timestamp
|
25321 | 25530 |
|
25322 | 25531 | var timestampUnderlyingCallsCount = 0
|
|
0 commit comments