Skip to content

Commit

Permalink
Restore arg validation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
atifaziz committed Dec 29, 2024
1 parent 75db6f3 commit 0bbd80f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions MoreLinq.Test/AggregateRightTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ public class AggregateRightTest
[Test]
public void AggregateRightWithEmptySequence()
{
using var source = TestingSequence.Of<int>();
void Act() => source.AggregateRight((a, b) => a + b);
Assert.That(Act, Throws.InvalidOperationException);
Assert.That(() => new int[0].AggregateRight((a, b) => a + b),
Throws.InvalidOperationException);
}

[Test]
Expand Down
3 changes: 1 addition & 2 deletions MoreLinq.Test/ExactlyTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ public class ExactlyTest
[Test]
public void ExactlyWithNegativeCount()
{
using var source = TestingSequence.Of(1);
Assert.That(() => source.Exactly(-1),
Assert.That(() => new[] { 1 }.Exactly(-1),
Throws.ArgumentOutOfRangeException("count"));
}

Expand Down

0 comments on commit 0bbd80f

Please sign in to comment.