public ScopedContext(AsyncTestHarness harness) { ConsumeContext = harness.GetTask <ConsumeContext>(); ConsumeContextEasyA = harness.GetTask <ConsumeContext <EasyA> >(); ConsumeContextEasyB = harness.GetTask <ConsumeContext <EasyB> >(); SendContext = harness.GetTask <SendContext>(); }
public ScopedContext(TaskCompletionSource <ScopedContext> taskCompletionSource, AsyncTestHarness harness) { ConsumeContext = harness.GetTask <ConsumeContext>(); ConsumeContextEasyA = harness.GetTask <ConsumeContext <EasyA> >(); ConsumeContextEasyB = harness.GetTask <ConsumeContext <EasyB> >(); SendContext = harness.GetTask <SendContext>(); taskCompletionSource.TrySetResult(this); }
public PublishObserver(AsyncTestHarness fixture) { _postSend = fixture.GetTask <PublishContext>(); _preSend = fixture.GetTask <PublishContext>(); _sendFaulted = fixture.GetTask <PublishContext>(); }
/// <summary> /// Returns a task completion that is automatically canceled when the test is canceled /// </summary> /// <typeparam name="T">The task type</typeparam> /// <returns></returns> public TaskCompletionSource <T> GetTask <T>() { return(AsyncTestHarness.GetTask <T>()); }