Wednesday, March 22, 2017 [Tweets] [Favorites]

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

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment