Function not(_:)
public func not(_ times: Int) -> CountMatcher
Negate an exact count, only passing on non-matching counts.
Combined count matchers can be used to perform complex checks on the number of invocations received.
// Checks that n ≠ 1
verify(bird.fly()).wasCalled(not(once))
Parameters
Name | Type | Description |
---|---|---|
countMatcher | An exact count to negate. |
Returns
A negated count matcher.