iOS单元测试中测试异步方法
2017-06-08 12:01
260 查看
- (void)testAsync { //设置预期 XCTestExpectation *expactation = [self expectationWithDescription:@"异步测试"]; [Person loadPersonAsync:^(Person *person) { NSLog(@"%@",person); //预期达成 [expactation fulfill]; }]; //预期超时等待 [self waitForExpectationsWithTimeout:10 handler:nil]; }
相关文章推荐
- iOS中异步回调的单元测试方法
- 使用 BenchmarkDotnet 测试代码性能 【Win10】单元测试中捕获异步方法的指定异常
- VS2005单元测试中测试无返回值的方法.
- VS2005单元测试中测试无返回值的方法
- 单元测试中测试用例的设计方法
- ios 单元测试方法说明
- 单元测试不可测试那些类(无抽象、静态类、静态方法)
- 如何使用单元测试 测试WEB组件方法中的含有Session、Cookie等HttpContext功能调用的方法?
- iOS开发那些事--编写OCUnit测试方法-应用测试方法 推荐
- android不用另建工程进行单元测试及改变测试方法执行顺序
- 测试一段iOS代码运行时间的两种方法
- iOS开发那些事--编写OCUnit测试方法-逻辑测试方法
- 消除 bug 三种方法:代码复查、单元测试、系统测试
- Visual Studio 2008 进行单元测试之测试私有方法
- 单元测试的测试用例编写方法
- GHUnit IOS开发第三方单元测试工具 使用方法
- VS2005单元测试中测试无返回值的方法
- 如何使用单元测试 测试WEB组件方法中的含有Session、Cookie等HttpContext功能调用的方法? 转
- Visual Studio 进行单元测试时如何附加被测试文件的方法总结
- [ios] xcode 4.2 创建 adhoc 发布应用测试方法