mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 11:58:32 +00:00
Remove unused protocol.
This commit is contained in:
@@ -6332,50 +6332,6 @@ class NetworkMonitorMock: NetworkMonitorProtocol {
|
||||
var underlyingReachabilityPublisher: CurrentValuePublisher<NetworkMonitorReachability, Never>!
|
||||
|
||||
}
|
||||
class NotificationCenterMock: NotificationCenterProtocol {
|
||||
|
||||
//MARK: - post
|
||||
|
||||
var postNameObjectUnderlyingCallsCount = 0
|
||||
var postNameObjectCallsCount: Int {
|
||||
get {
|
||||
if Thread.isMainThread {
|
||||
return postNameObjectUnderlyingCallsCount
|
||||
} else {
|
||||
var returnValue: Int? = nil
|
||||
DispatchQueue.main.sync {
|
||||
returnValue = postNameObjectUnderlyingCallsCount
|
||||
}
|
||||
|
||||
return returnValue!
|
||||
}
|
||||
}
|
||||
set {
|
||||
if Thread.isMainThread {
|
||||
postNameObjectUnderlyingCallsCount = newValue
|
||||
} else {
|
||||
DispatchQueue.main.sync {
|
||||
postNameObjectUnderlyingCallsCount = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var postNameObjectCalled: Bool {
|
||||
return postNameObjectCallsCount > 0
|
||||
}
|
||||
var postNameObjectReceivedArguments: (aName: NSNotification.Name, anObject: Any?)?
|
||||
var postNameObjectReceivedInvocations: [(aName: NSNotification.Name, anObject: Any?)] = []
|
||||
var postNameObjectClosure: ((NSNotification.Name, Any?) -> Void)?
|
||||
|
||||
func post(name aName: NSNotification.Name, object anObject: Any?) {
|
||||
postNameObjectCallsCount += 1
|
||||
postNameObjectReceivedArguments = (aName: aName, anObject: anObject)
|
||||
DispatchQueue.main.async {
|
||||
self.postNameObjectReceivedInvocations.append((aName: aName, anObject: anObject))
|
||||
}
|
||||
postNameObjectClosure?(aName, anObject)
|
||||
}
|
||||
}
|
||||
class NotificationManagerMock: NotificationManagerProtocol {
|
||||
weak var delegate: NotificationManagerDelegate?
|
||||
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
//
|
||||
// Copyright 2023 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
// sourcery: AutoMockable
|
||||
protocol NotificationCenterProtocol: AnyObject {
|
||||
func post(name aName: NSNotification.Name, object anObject: Any?)
|
||||
}
|
||||
|
||||
extension NotificationCenter: NotificationCenterProtocol { }
|
||||
Reference in New Issue
Block a user