예제 #1
0
        public void CountMoreThan_IEnumerable_ResetWasCall()
        {
            var enumerable = EnumerableMock.CreateWintCountElems(1);

            EnumerableExtension.CountMoreThan(enumerable, 1);
            Assert.True(enumerable.ResetWasCall);
        }
예제 #2
0
        public void CountMoreThan_IEnumerableManyElems_NoUnnecessaryIterations()
        {
            EnumerableMock enumerable = EnumerableMock.CreateWintCountElems(100);

            EnumerableExtension.CountMoreThan(enumerable, 100);
            Assert.Equal(101, enumerable.MoveNextCallCounter);
        }
예제 #3
0
 public void CountMoreThan_IEnumerableCountIsEquals_False()
 {
     Assert.False(EnumerableExtension.CountMoreThan(EnumerableMock.CreateWintCountElems(2), 2));
 }
예제 #4
0
 public void CountMoreThan_IEnumerableCountIsMore_True()
 {
     Assert.True(EnumerableExtension.CountMoreThan(EnumerableMock.CreateWintCountElems(2), 1));
 }
예제 #5
0
 public void CountMoreThan_IEnumerableCountIsLess_False()
 {
     Assert.False(EnumerableExtension.CountMoreThan(EnumerableMock.CreateEmpty(), 1));
 }
예제 #6
0
 public void CountMoreThan_ICollectionCountIsMore_True()
 {
     Assert.True(EnumerableExtension.CountMoreThan(
                     enumerable: new OnlyCountCollectionMock(count: 1),
                     count: 0));
 }
예제 #7
0
 public void CountMoreThan_ICollectionCountIsEquals_False()
 {
     Assert.False(EnumerableExtension.CountMoreThan(
                      enumerable: new OnlyCountCollectionMock(count: 1),
                      count: 1));
 }