Wednesday, March 22, 2017

XCTest Closure Based Expectations

Giovanni Lodi:

XCTest provides a method to generate an expectation that will fulfil based on the result of an NSPredicate, expectation(for:, evaluatedWith:, handler:).

Add to that the fact that NSPredicate can be initialized with a closure to evaluate, and now you have a recipe for a closure based expectation.

Comments RSS · Twitter

Leave a Comment