public void Cycle_WithNonEmptyEnumerableAndNullRepeat_ExpectsInfiniteEnumerable() { var cycle = ENMRBL_NON_EMPTY.Cycle(); using (var enmrtr = cycle.GetEnumerator()) { for (var index = 0; enmrtr.MoveNext(); ++index) { if (index == COUNT_BIG) { break; } } True(enmrtr.MoveNext()); } }
public void Cycle_WithNonEmptyEnumerableAndAnyRepeat_ExpectsSameEnumerableTimesAny() => Utilities.AssertManySequencesEqual( ENMRBL_NON_EMPTY.Cycle(COUNT_ANY), Enumerable.Repeat(ENMRBL_NON_EMPTY, COUNT_ANY) .SelectMany(coll => coll));
public void Cycle_WithNonEmptyEnumerableAndNoRepeat_ExpectsEmptyEnumerable() => Utilities.AssertManySequencesEqual( ENMRBL_NON_EMPTY.Cycle(0), ENMRBL_EMPTY);