Instance Method

called(times:after:file:line:)

Checks that the function has been called a number of times corresponding to the predicate.

Declaration

@discardableResult func called(times: Predicate<Int> = >0, after assertion: Assertion? = nil, file: StaticString = #file, line: UInt = #line) -> Assertion

Return Value

A new Assertion.

Parameters

times

Predicate that corresponds to the number of calls.

assertion

Previous assertion. nil by default.

file

File where called is called.

line

Line where calledis called.