Esempio 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);
        }
 public static void CatchesAsyncException()
 {
     Assert.That(async() => await AsyncTestDelegates.ThrowsArgumentExceptionAsync(), Throws.Exception);
 }