Permalink
Browse files

Add unit test for partition change

  • Loading branch information...
1 parent 1b9907b commit 90d6445914b1217a1a7875392837880060c3f8f9 @scarney81 committed Feb 10, 2012
Showing with 14 additions and 0 deletions.
  1. +14 −0 src/PagedList.Tests/SplitAndPartitionFacts.cs
@@ -19,6 +19,20 @@ public void Partition_Works()
Assert.Equal(1000, splitList.First().Count());
Assert.Equal(999, splitList.Last().Count());
}
+
+ [Fact]
+ public void Paritiion_Returns_Enumerable_With_One_Item_When_Count_Less_Than_Page_Size()
+ {
+ //arrange
+ var list = Enumerable.Range(1,10);
+
+ //act
+ var partitionList = list.Partition(1000);
+
+ //assert
+ Assert.Equal(1, splitList.Count());
+ Assert.Equal(10, splitList.First().Count());
+ }
[Fact]
public void Split_Works()

0 comments on commit 90d6445

Please sign in to comment.