Functions
The following functions are available globally.
-
Assert number of calls for given selector on a type
Declaration
Swift
public func XCTAssertSelectorCalls<T: MockedType>(_ mockType: T.Type, _ selector: Selector, _ calls: Int, _ message: String = "Selector was not called desired number of times", file: StaticString = #file, line: UInt = #line)
Parameters
mockType
Mock type we are checking
MockType.self
selector
selector to check for
#selector(functionSelector)
calls
expected number of calls
-
Assert number of calls for given selector on an instance
Declaration
Swift
public func XCTAssertSelectorCalls<T: MockedObject>(_ mock: T, _ selector: Selector, _ calls: Int, _ message: String = "Selector was not called desired number of times", file: StaticString = #file, line: UInt = #line)
Parameters
mock
instance we are checking
selector
selector to check for
#selector(functionSelector)
calls
expected number of calls