public void CountMoreThan_IEnumerableManyElems_NoUnnecessaryIterations() { EnumerableMock enumerable = EnumerableMock.CreateWintCountElems(100); EnumerableExtension.CountMoreThan(enumerable, 100); Assert.Equal(101, enumerable.MoveNextCallCounter); }
public void CountMoreThan_IEnumerable_ResetWasCall() { var enumerable = EnumerableMock.CreateWintCountElems(1); EnumerableExtension.CountMoreThan(enumerable, 1); Assert.True(enumerable.ResetWasCall); }
public void Any_IEnumerableManyElems_NoUnnecessaryIterations() { EnumerableMock enumerable = EnumerableMock.CreateWintCountElems(9); EnumerableExtension.Any(enumerable); Assert.Equal(1, enumerable.MoveNextCallCounter); }
public void CountMoreThan_IEnumerableCountIsEquals_False() { Assert.False(EnumerableExtension.CountMoreThan(EnumerableMock.CreateWintCountElems(2), 2)); }
public void CountMoreThan_IEnumerableCountIsMore_True() { Assert.True(EnumerableExtension.CountMoreThan(EnumerableMock.CreateWintCountElems(2), 1)); }
public void CountLessThan_IEnumerableCountIsMore_False() { Assert.False(EnumerableExtension.CountLessThan(EnumerableMock.CreateWintCountElems(2), 1)); }
public void Count_IEnumerableCountIsLess_False() { int count = 10; Assert.Equal(count, EnumerableExtension.Count(EnumerableMock.CreateWintCountElems(count))); }
public void CountEquals_IEnumerableCountIsEquals_True() { Assert.True(EnumerableExtension.CountEquals(EnumerableMock.CreateWintCountElems(2), 2)); }