public void CountMoreThan_IEnumerable_ResetWasCall() { var enumerable = EnumerableMock.CreateWintCountElems(1); EnumerableExtension.CountMoreThan(enumerable, 1); Assert.True(enumerable.ResetWasCall); }
public void CountMoreThan_IEnumerableManyElems_NoUnnecessaryIterations() { EnumerableMock enumerable = EnumerableMock.CreateWintCountElems(100); EnumerableExtension.CountMoreThan(enumerable, 100); Assert.Equal(101, 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 CountMoreThan_IEnumerableCountIsLess_False() { Assert.False(EnumerableExtension.CountMoreThan(EnumerableMock.CreateEmpty(), 1)); }
public void CountMoreThan_ICollectionCountIsMore_True() { Assert.True(EnumerableExtension.CountMoreThan( enumerable: new OnlyCountCollectionMock(count: 1), count: 0)); }
public void CountMoreThan_ICollectionCountIsEquals_False() { Assert.False(EnumerableExtension.CountMoreThan( enumerable: new OnlyCountCollectionMock(count: 1), count: 1)); }