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