Contents

dynamicallyCall(withKeywordArguments:)

Creates an expectation from value expectations that you label with parameter or property names.

Declaration

func dynamicallyCall(withKeywordArguments args: KeyValuePairs<String, Argument?>) -> Expectation

Parameters

  • args:

    The value expectations, keyed by argument label. A nil value leaves the corresponding parameter or property unchecked.

Return Value

An expectation that checks each labeled parameter or property against its value expectation.

Discussion

You don’t call this method directly. Swift calls it when you call the callable with labeled arguments. Give every argument a label, and use each label only once; otherwise, the method stops with a precondition failure.