public void AwaitOperatorShouldPreserveSynchronizationContext()
        {
            var c = new SingleThreadSynchronizationContext();
            SynchronizationContext.SetSynchronizationContext(c);

            RunRandomTasksAsync().Wait();

            c.Stop();
        }
Ejemplo n.º 2
0
 public void TestInitialize()
 {
     _context = new SingleThreadSynchronizationContext();
 }