Ejemplo n.º 1
0
        public async Task AsyncRegionThrowsDoesNotDisposeAsyncRegion()
        {
            await AsyncTestDelegates.Delay(100);

            Assert.ThrowsAsync <ArgumentException>(async() => await AsyncTestDelegates.ThrowsArgumentExceptionAsync());
            Assert.That(async() => await AsyncTestDelegates.ThrowsArgumentExceptionAsync(), Throws.ArgumentException);
        }
Ejemplo n.º 2
0
 public static void CatchesAsyncException()
 {
     Assert.That(async() => await AsyncTestDelegates.ThrowsArgumentExceptionAsync(), Throws.Exception);
 }