Function not(_:)
public func not(_ countMatcher: CountMatcher) -> CountMatcher
Negate a count matcher, 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(exactly(once)))
Parameters
Name | Type | Description |
---|---|---|
countMatcher | CountMatcher |
A count matcher to negate. |
Returns
A negated count matcher.