// Generated using Sourcery 2.0.1 — https://github.com/krzysztofzablocki/Sourcery // DO NOT EDIT // swiftlint:disable all import Combine import MatrixRustSDK class BugReportServiceMock: BugReportServiceProtocol { var crashedLastRun: Bool { get { return underlyingCrashedLastRun } set(value) { underlyingCrashedLastRun = value } } var underlyingCrashedLastRun: Bool! // MARK: - crash var crashCallsCount = 0 var crashCalled: Bool { return crashCallsCount > 0 } var crashClosure: (() -> Void)? func crash() { crashCallsCount += 1 crashClosure?() } // MARK: - submitBugReport var submitBugReportProgressListenerThrowableError: Error? var submitBugReportProgressListenerCallsCount = 0 var submitBugReportProgressListenerCalled: Bool { return submitBugReportProgressListenerCallsCount > 0 } var submitBugReportProgressListenerReceivedArguments: (bugReport: BugReport, progressListener: ProgressListener?)? var submitBugReportProgressListenerReceivedInvocations: [(bugReport: BugReport, progressListener: ProgressListener?)] = [] var submitBugReportProgressListenerReturnValue: SubmitBugReportResponse! var submitBugReportProgressListenerClosure: ((BugReport, ProgressListener?) async throws -> SubmitBugReportResponse)? func submitBugReport(_ bugReport: BugReport, progressListener: ProgressListener?) async throws -> SubmitBugReportResponse { if let error = submitBugReportProgressListenerThrowableError { throw error } submitBugReportProgressListenerCallsCount += 1 submitBugReportProgressListenerReceivedArguments = (bugReport: bugReport, progressListener: progressListener) submitBugReportProgressListenerReceivedInvocations.append((bugReport: bugReport, progressListener: progressListener)) if let submitBugReportProgressListenerClosure = submitBugReportProgressListenerClosure { return try await submitBugReportProgressListenerClosure(bugReport, progressListener) } else { return submitBugReportProgressListenerReturnValue } } } class SessionVerificationControllerProxyMock: SessionVerificationControllerProxyProtocol { var callbacks: PassthroughSubject { get { return underlyingCallbacks } set(value) { underlyingCallbacks = value } } var underlyingCallbacks: PassthroughSubject! var isVerified: Bool { get { return underlyingIsVerified } set(value) { underlyingIsVerified = value } } var underlyingIsVerified: Bool! // MARK: - requestVerification var requestVerificationCallsCount = 0 var requestVerificationCalled: Bool { return requestVerificationCallsCount > 0 } var requestVerificationReturnValue: Result! var requestVerificationClosure: (() async -> Result)? func requestVerification() async -> Result { requestVerificationCallsCount += 1 if let requestVerificationClosure = requestVerificationClosure { return await requestVerificationClosure() } else { return requestVerificationReturnValue } } // MARK: - startSasVerification var startSasVerificationCallsCount = 0 var startSasVerificationCalled: Bool { return startSasVerificationCallsCount > 0 } var startSasVerificationReturnValue: Result! var startSasVerificationClosure: (() async -> Result)? func startSasVerification() async -> Result { startSasVerificationCallsCount += 1 if let startSasVerificationClosure = startSasVerificationClosure { return await startSasVerificationClosure() } else { return startSasVerificationReturnValue } } // MARK: - approveVerification var approveVerificationCallsCount = 0 var approveVerificationCalled: Bool { return approveVerificationCallsCount > 0 } var approveVerificationReturnValue: Result! var approveVerificationClosure: (() async -> Result)? func approveVerification() async -> Result { approveVerificationCallsCount += 1 if let approveVerificationClosure = approveVerificationClosure { return await approveVerificationClosure() } else { return approveVerificationReturnValue } } // MARK: - declineVerification var declineVerificationCallsCount = 0 var declineVerificationCalled: Bool { return declineVerificationCallsCount > 0 } var declineVerificationReturnValue: Result! var declineVerificationClosure: (() async -> Result)? func declineVerification() async -> Result { declineVerificationCallsCount += 1 if let declineVerificationClosure = declineVerificationClosure { return await declineVerificationClosure() } else { return declineVerificationReturnValue } } // MARK: - cancelVerification var cancelVerificationCallsCount = 0 var cancelVerificationCalled: Bool { return cancelVerificationCallsCount > 0 } var cancelVerificationReturnValue: Result! var cancelVerificationClosure: (() async -> Result)? func cancelVerification() async -> Result { cancelVerificationCallsCount += 1 if let cancelVerificationClosure = cancelVerificationClosure { return await cancelVerificationClosure() } else { return cancelVerificationReturnValue } } } // swiftlint:enable all