Skip to content

Commit 8175554

Browse files
committed
Fixing NUnit
1 parent 93a4cbd commit 8175554

File tree

7 files changed

+8
-6
lines changed

7 files changed

+8
-6
lines changed

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<RepositoryType>git</RepositoryType>
1616
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
1717
<PackageLicenseExpression>MIT</PackageLicenseExpression>
18+
<PackageReadmeFile>README.md</PackageReadmeFile>
1819
</PropertyGroup>
1920
<ItemGroup>
2021
<PackageReference Include="Nerdbank.GitVersioning" Version="3.7.115">

tests/System.IO.Abstractions.Extensions.Tests/DirectoryInfoExtensionsTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using NUnit.Framework;
22
using System.Collections.Generic;
3+
using Assert = NUnit.Framework.Legacy.ClassicAssert;
34

45
namespace System.IO.Abstractions.Extensions.Tests
56
{

tests/System.IO.Abstractions.Extensions.Tests/DisposableDirectoryTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using NUnit.Framework;
2+
using Assert = NUnit.Framework.Legacy.ClassicAssert;
23

34
namespace System.IO.Abstractions.Extensions.Tests
45
{

tests/System.IO.Abstractions.Extensions.Tests/DisposableFileTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using NUnit.Framework;
2+
using Assert = NUnit.Framework.Legacy.ClassicAssert;
23

34
namespace System.IO.Abstractions.Extensions.Tests
45
{

tests/System.IO.Abstractions.Extensions.Tests/FileInfoExtensionsTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using NUnit.Framework;
22
using System.Linq;
33
using System.Text;
4+
using Assert = NUnit.Framework.Legacy.ClassicAssert;
45

56
namespace System.IO.Abstractions.Extensions.Tests
67
{

tests/System.IO.Abstractions.Extensions.Tests/FileSystemExtensionsTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using NUnit.Framework;
2+
using Assert = NUnit.Framework.Legacy.ClassicAssert;
23

34
namespace System.IO.Abstractions.Extensions.Tests
45
{
@@ -42,7 +43,7 @@ public void CurrentDirectoryTest()
4243
var fullName = fs.CurrentDirectory().FullName;
4344

4445
Assert.IsFalse(String.IsNullOrWhiteSpace(fullName));
45-
Assert.AreEqual(Environment.CurrentDirectory, fullName);
46+
NUnit.Framework.Assert.That(fullName, Is.EqualTo(Environment.CurrentDirectory));
4647
}
4748

4849
[Test]

tests/System.IO.Abstractions.Extensions.Tests/System.IO.Abstractions.Extensions.Tests.csproj

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,10 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
5-
<TargetFrameworks Condition="!$([MSBuild]::IsOsUnixLike())">$(TargetFrameworks);net462</TargetFrameworks>
5+
<TargetFrameworks Condition="!$([MSBuild]::IsOsUnixLike())">$(TargetFrameworks);net472</TargetFrameworks>
66
<IsPackable>false</IsPackable>
77
<IsTestable>true</IsTestable>
88
</PropertyGroup>
9-
10-
<ItemGroup>
11-
<Using Include="NUnit.Framework.Legacy.ClassicAssert" Alias="Assert" />
12-
</ItemGroup>
139

1410
<ItemGroup>
1511
<ProjectReference Include="..\..\src\System.IO.Abstractions.Extensions\System.IO.Abstractions.Extensions.csproj" />

0 commit comments

Comments
 (0)