Skip to content

Commit

Permalink
Add tests to demo issue morelinq#741
Browse files Browse the repository at this point in the history
  • Loading branch information
atifaziz committed Dec 27, 2019
1 parent dc9542e commit b90b4fc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions MoreLinq.Test/BatchTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,15 @@ public void BatchReadOnlyCollectionSmallerThanSize(int oversize)
reader.Read().AssertSequenceEqual(1, 2, 3, 4, 5);
reader.ReadEnd();
}

[TestCase(SourceKind.Sequence)]
[TestCase(SourceKind.BreakingList)]
[TestCase(SourceKind.BreakingReadOnlyList)]
[TestCase(SourceKind.BreakingCollection)]
public void BatchEmptySource(SourceKind kind)
{
var batches = Enumerable.Empty<int>().ToSourceKind(kind).Batch(100);
Assert.That(batches, Is.Empty);
}
}
}

0 comments on commit b90b4fc

Please sign in to comment.