Skip to content

Commit

Permalink
Add Skip and Take for arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmada committed Jan 31, 2020
1 parent 920fdd6 commit c7193a6
Show file tree
Hide file tree
Showing 6 changed files with 817 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using NetFabric.Assertive;
using Xunit;

namespace NetFabric.Hyperlinq.UnitTests
{
public class SkipArrayTests
{
[Theory]
[MemberData(nameof(TestData.SkipEmpty), MemberType = typeof(TestData))]
[MemberData(nameof(TestData.SkipSingle), MemberType = typeof(TestData))]
[MemberData(nameof(TestData.SkipMultiple), MemberType = typeof(TestData))]
public void Skip_With_ValidData_Should_Succeed(int[] source, int count)
{
// Arrange
var expected = System.Linq.Enumerable.Skip(source, count);

// Act
var result = Array.Skip(source, count);

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

0 comments on commit c7193a6

Please sign in to comment.