AsyncUnitTests 异步单元测试的助手
Microsoft Fakes的异步感知默认存根行为Microsoft Fakes的内置默认存根行为将从异步方法返回null任务。提供AsyncAwareDefaultValueStubBehavior类型。推荐的用法是将异步感知默认存根行为应用于项目中的所有单元测试: [ AssemblyInitialize ] public static void Initialize ( TestContext context ) { StubBehaviors . Current = new Nito . Async . UnitTests . AsyncAwareDefaultValueStubBehavior (); }但是,它可以在逐个测试的基础上进行设置: var stub = new Stub ...; stub . InstanceBehavior = new
下载地址
用户评论