public void WhenActionThrowsExceptionThenShouldThrowInnerException() { Assert.ThrowsException <NotImplementedException>(() => PerformanceUtil.MeasureTime(() => { throw new NotImplementedException(); }, out TimeSpan time)); }
public void WhenActionIsNotNullThenElapsedTimeShouldNotBeZero() { PerformanceUtil.MeasureTime(() => { int a = 1; a++; Debug.Write("Passou aqui!"); }, out TimeSpan time); Assert.AreNotEqual(0, time.Ticks); }
public void WhenActionIsNullThenShouldThrowException() { Assert.ThrowsException <ArgumentNullException>(() => PerformanceUtil.MeasureTime(null, out TimeSpan time)); }