build(2022): Restructure using NUnit not XUnit

This commit is contained in:
Josh Creek
2022-10-12 19:36:57 +01:00
parent 566be1e2b6
commit 5d101b116f
7 changed files with 47 additions and 52 deletions
+24
View File
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="NUnit.Analyzers" Version="3.3.0" />
<PackageReference Include="coverlet.collector" Version="3.1.2" />
</ItemGroup>
<ItemGroup>
<Folder Include="Y2022\Data\" />
<Folder Include="Y2022\Tasks\" />
</ItemGroup>
</Project>
+1
View File
@@ -0,0 +1 @@
global using NUnit.Framework;
+16
View File
@@ -0,0 +1,16 @@
namespace AOC.Test.Y2022
{
public class Day01
{
[SetUp]
public void Setup()
{
}
[Test]
public void Test1()
{
Assert.Pass();
}
}
}
-28
View File
@@ -1,28 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Data\" />
</ItemGroup>
</Project>
-1
View File
@@ -1 +0,0 @@
global using Xunit;
-17
View File
@@ -1,17 +0,0 @@
namespace AOC.Tests.Y2022
{
public class Day01
{
[Fact]
public void Part1()
{
}
[Fact]
public void Part2()
{
}
}
}
+6 -6
View File
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.3.32922.545 VisualStudioVersion = 17.3.32922.545
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AOC.Tests", "AOC.Tests\AOC.Tests.csproj", "{A0CBFD3C-1673-4A13-B1F8-A275EE17AEB4}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AOC.Test", "AOC.Test\AOC.Test.csproj", "{707CAC4A-6193-41C9-B5D6-CFD869C9FF95}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -11,15 +11,15 @@ Global
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A0CBFD3C-1673-4A13-B1F8-A275EE17AEB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {707CAC4A-6193-41C9-B5D6-CFD869C9FF95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A0CBFD3C-1673-4A13-B1F8-A275EE17AEB4}.Debug|Any CPU.Build.0 = Debug|Any CPU {707CAC4A-6193-41C9-B5D6-CFD869C9FF95}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A0CBFD3C-1673-4A13-B1F8-A275EE17AEB4}.Release|Any CPU.ActiveCfg = Release|Any CPU {707CAC4A-6193-41C9-B5D6-CFD869C9FF95}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A0CBFD3C-1673-4A13-B1F8-A275EE17AEB4}.Release|Any CPU.Build.0 = Release|Any CPU {707CAC4A-6193-41C9-B5D6-CFD869C9FF95}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E208FF57-9228-4724-B651-45C1FECB4E29} SolutionGuid = {65F1D061-1249-4BFA-92B8-E0072972D0EF}
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal