コード例 #1
0
 public void WhenAsyncCalledInvokesAsynchronously()
 {
     AsyncEntity a = new AsyncEntity();
     Stopwatch stopwatch = new Stopwatch();
     stopwatch.Start();
     a.Async( 100 );
     stopwatch.Stop();
     Assert.Less( stopwatch.ElapsedMilliseconds, 50 );
 }
コード例 #2
0
        public void WhenAsyncCalledInvokesAsynchronously()
        {
            AsyncEntity a         = new AsyncEntity();
            Stopwatch   stopwatch = new Stopwatch();

            stopwatch.Start();
            a.Async(100);
            stopwatch.Stop();
            Assert.Less(stopwatch.ElapsedMilliseconds, 50);
        }