Пример #1
0
 public void TimeEqual1500_Disabled()
 {
     MeasurementAction.IsEnabled = false;
     using (var measure = MeasurementAction.StartMeasure(watch =>
     {
         Assert.IsTrue(watch.ElapsedMilliseconds.Equals(0));
     }, true))
     {
         Thread.Sleep(1500);
     }
 }
Пример #2
0
 public void TimeEqualZero_Enabled()
 {
     MeasurementAction.IsEnabled = true;
     using (var measure = MeasurementAction.StartMeasure(watch =>
     {
         Assert.IsTrue(watch.ElapsedTicks.Equals(0));
     }, false))
     {
         Thread.Sleep(1000);
     }
 }
Пример #3
0
 public void TimeEqual1500_Enabled()
 {
     MeasurementAction.IsEnabled = true;
     using (var measure = MeasurementAction.StartMeasure(watch =>
     {
         Assert.IsTrue(watch.ElapsedMilliseconds >= 1500 && watch.ElapsedMilliseconds <= 1502);
     }, true))
     {
         Thread.Sleep(1500);
     }
 }