Skip to content

Commit

Permalink
Upgraded to NUnit 4
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasArdal committed Dec 4, 2023
1 parent 18ef32c commit 28acd3e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit" Version="4.0.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ namespace Elmah.Io.AspNetCore.Tests.Extensions
{
public class ObjectExtensionsTests
{
[Test] public void StringIsValid() => Assert.IsTrue("Hello".IsValidForItems());
[Test] public void IntIsValid() => Assert.IsTrue(42.IsValidForItems());
[Test] public void VersionIsValid() => Assert.IsTrue(new Version("1.0.0").IsValidForItems());
[Test] public void IPAddressIsValid() => Assert.IsTrue(IPAddress.Parse("127.0.0.1").IsValidForItems());
[Test] public void ObjectNotValid() => Assert.IsFalse(new ArgumentException().IsValidForItems());
[Test] public void StringIsValid() => Assert.That("Hello".IsValidForItems(), Is.True);
[Test] public void IntIsValid() => Assert.That(42.IsValidForItems(), Is.True);
[Test] public void VersionIsValid() => Assert.That(new Version("1.0.0").IsValidForItems(), Is.True);
[Test] public void IPAddressIsValid() => Assert.That(IPAddress.Parse("127.0.0.1").IsValidForItems(), Is.True);
[Test] public void ObjectNotValid() => Assert.That(new ArgumentException().IsValidForItems(), Is.False);
}
}

0 comments on commit 28acd3e

Please sign in to comment.