Skip to content

Commit

Permalink
Correct test
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorPilley committed Nov 22, 2023
1 parent b9da969 commit beb4247
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/PhoneNumbers.Tests/ParseOptionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,15 @@ public void Extensions_Throw_If_ParseOptions_Null()
{
var parseOptions = default(ParseOptions);

typeof(ParseOptions)
var methods = typeof(ParseOptionsExtensions)

Check failure on line 134 in test/PhoneNumbers.Tests/ParseOptionsTests.cs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest)

Cannot assign void to an implicitly-typed variable

Check failure on line 134 in test/PhoneNumbers.Tests/ParseOptionsTests.cs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest)

Cannot assign void to an implicitly-typed variable
.GetMethods(BindingFlags.Static | BindingFlags.Public)
.Where(x => x.GetParameters().Length == 1 && x.GetParameters()[0].ParameterType == typeof(ParseOptions))
.ToList()
.ForEach(x => Assert.Throws<ArgumentNullException>(() => x.Invoke(null, [parseOptions])));
.ForEach(x =>
{
var exception = Assert.Throws<TargetInvocationException>(() => x.Invoke(null, [parseOptions]));
Assert.IsType<ArgumentNullException>(exception.InnerException);
});
}

[Fact]
Expand Down

0 comments on commit beb4247

Please sign in to comment.