Ejemplo n.º 1
0
        public void Skip_With_ValidData_Must_Succeed(int[] source, int count)
        {
            // Arrange
            var wrapped  = Wrap.AsValueEnumerable(source);
            var expected = System.Linq.Enumerable.Skip(source, count);

            // Act
            var result = ValueEnumerableExtensions
                         .Skip <Wrap.ValueEnumerableWrapper <int>, Wrap.Enumerator <int>, int>(wrapped, count);

            // Assert
            _ = result.Must()
                .BeEnumerableOf <int>()
                .BeEqualTo(expected);
        }
        public void Skip_Take_With_ValidData_Must_Succeed(int[] source, int skip, int take)
        {
            // Arrange
            var wrapped = Wrap
                          .AsValueEnumerable(source);
            var expected = Enumerable
                           .Skip(source, skip)
                           .Take(take);

            // Act
            var result = ValueEnumerableExtensions
                         .Skip <Wrap.ValueEnumerableWrapper <int>, Wrap.Enumerator <int>, int>(wrapped, skip)
                         .Take(take);

            // Assert
            _ = result.Must()
                .BeEnumerableOf <int>()
                .BeEqualTo(expected);
        }