Instance Method

called(times:after:file:line:)

Checks that the function has been called.

Declaration

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

Return Value

A new Assertion.

Parameters

times

The expected number of calls.

assertion

Previous assertion. nil by default.

file

File where called is called.

line

Line where calledis called.