public void ShouldRunAsyncTest_AlternateUsageStyle() { Action<AsyncTest> onStart = test => { var stub = new Stub(); var eventCount = 0; stub.Done += delegate { eventCount++; }; stub.Done += delegate { eventCount.ShouldBe(1); test.Complete(); }; stub.Begin(); }; AsyncTest.Start(onStart); }
public void ShouldRunAsyncTest() { var stub = new Stub(); var eventCount = 0; stub.Done += delegate { eventCount++; }; AsyncTest.Start(test => { stub.Done += delegate { eventCount.ShouldBe(1); test.Complete(); }; stub.Begin(); }); }