public void No_Arg_All_Values_Are_Between_Zero_And_MaxValue() { var timeSpans = new TimeSpan[Assertion.Amount]; for (var i = 0; i < Assertion.Amount; i++) { timeSpans[i] = TimeSpanProvider.TimeSpan(); } timeSpans.AssertNotAllValuesAreTheSame(); Assert.True( timeSpans.All(x => x > TimeSpan.Zero && x < TimeSpan.MaxValue), "TimeSpans.All(x => x > 0 && x < TimeSpan.MaxValue)" ); }
public void All_Values_Are_Between_Zero_And_Max() { var timeSpans = new TimeSpan[Assertion.Amount]; var max = TimeSpan.FromDays(1); for (var i = 0; i < Assertion.Amount; i++) { timeSpans[i] = TimeSpanProvider.TimeSpan(max); } timeSpans.AssertNotAllValuesAreTheSame(); Assert.True( timeSpans.All(x => x >= TimeSpan.Zero && x < max), "TimeSpans.All(x => x > 0 && x < max)" ); }