public void double_stop_no_exception() { // Arrange // Act var taskInfo = new TaskInfo(); taskInfo.Start(); taskInfo.Stop(); taskInfo.Stop(); // Assert // If we got here w/o an exception, we passed }
public void double_stop_extends_duration() { // Arrange // Act var taskInfo = new TaskInfo(); taskInfo.Start(); Thread.Sleep(31); taskInfo.Stop(); Thread.Sleep(31); taskInfo.Stop(); // Assert Assert.LessOrEqual(.060, taskInfo.Duration); }
public void start_stop_check_time_success() { // Arrange // Act var taskInfo = new TaskInfo(); taskInfo.Start(); Thread.Sleep(31); taskInfo.Stop(); // Assert Assert.LessOrEqual(.030, taskInfo.Duration); }