public async Task SimpleAsyncTest() { Assert.AreEqual(42, await SomeDatabaseAccess.ReadDataAsync()); }
public async Task AsyncExceptionTest() { await Task.Delay(100); await SomeDatabaseAccess.FailingDataAccessAsync(); }
public void TestAsyncDBAccess() { // Note that this test will FAIL as ReadDataAsync // is an async method. Assert.AreEqual(42, SomeDatabaseAccess.ReadDataAsync()); }