예제 #1
0
 public void GetTimeElapsed()
 {
     var calculations = new Calculations();
     calculations.Start();
     Thread.Sleep(800);
     Assert.AreEqual(1,calculations.GetElapsedTime());
 }
예제 #2
0
 public void GetPreciseTimeElapsed()
 {
     var calculations = new Calculations();
     calculations.Start();
     Thread.Sleep(800);
     var elapsedTime = calculations.GetElapsedTime();
     Assert.IsTrue(elapsedTime>=0.75 || elapsedTime<0.90);
 }