Esempio n. 1
0
 public async Task SimpleAsyncTest()
 {
     Assert.AreEqual(42, await SomeDatabaseAccess.ReadDataAsync());
 }
Esempio n. 2
0
        public async Task AsyncExceptionTest()
        {
            await Task.Delay(100);

            await SomeDatabaseAccess.FailingDataAccessAsync();
        }
Esempio n. 3
0
 public void TestAsyncDBAccess()
 {
     // Note that this test will FAIL as ReadDataAsync
     // is an async method.
     Assert.AreEqual(42, SomeDatabaseAccess.ReadDataAsync());
 }