public async Task I_can_assert_a_derived_async_exception_and_get_no_error_if_derived_exception_was_thrown() { await SutAssert.ThrowsAsync <IOException>(() => Task.FromException(new FileNotFoundException()), true); }
public async Task I_can_assert_an_async_exception_and_get_an_error_if_no_exception_was_thrown() { await Assert.ThrowsAsync <AssertionException>( () => SutAssert.ThrowsAsync <IOException>(() => Task.CompletedTask) ); }
public async Task I_can_assert_an_async_exception_and_get_an_error_if_another_was_thrown() { await Assert.ThrowsAsync <AssertionException>( () => SutAssert.ThrowsAsync <IOException>(() => Task.FromException(new FileNotFoundException())) ); }
public async Task I_can_assert_an_async_exception_and_get_no_error_if_the_expected_exception_is_thrown() { await SutAssert.ThrowsAsync <IOException>(() => Task.FromException(new IOException())); }