Mockingbird Documentation 0.17.0

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

count​Matcher

An exact count to negate.

Returns

A negated count matcher.