mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-10 03:25:41 +00:00
[ci skip] test: assert ArgumentNullException from Grep
This commit is contained in:
parent
12d2e10be4
commit
4f3f791948
@ -44,6 +44,20 @@ public class EnumerableTests
|
|||||||
Assert.AreEqual(0, actualResult.Length);
|
Assert.AreEqual(0, actualResult.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Grep_ShouldThrowArgumentNullException_GivenNullPattern()
|
||||||
|
{
|
||||||
|
IEnumerable<string> source = Enumerable.Empty<string>();
|
||||||
|
Assert.ThrowsException<ArgumentNullException>(() => source.Grep(null!));
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Grep_ShouldThrowArgumentNullException_GivenNullSource()
|
||||||
|
{
|
||||||
|
IEnumerable<string> source = null!;
|
||||||
|
Assert.ThrowsException<ArgumentNullException>(() => source.Grep("foo"));
|
||||||
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Grep_ShouldYieldNoElements_GivenNoMatchingStrings()
|
public void Grep_ShouldYieldNoElements_GivenNoMatchingStrings()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user