Add SharpIDE.Application unit test project

This commit is contained in:
Matt Parker
2025-11-25 19:00:52 +10:00
parent 69a3787076
commit 6196a4f9e3
7 changed files with 59 additions and 0 deletions

View File

@@ -8,6 +8,7 @@
<ItemGroup> <ItemGroup>
<PackageVersion Include="Ardalis.GuardClauses" Version="5.0.0" /> <PackageVersion Include="Ardalis.GuardClauses" Version="5.0.0" />
<PackageVersion Include="AsyncReadProcess" Version="1.1.6" /> <PackageVersion Include="AsyncReadProcess" Version="1.1.6" />
<PackageVersion Include="AwesomeAssertions" Version="9.3.0" />
<PackageVersion Include="BenchmarkDotNet" Version="0.15.6" /> <PackageVersion Include="BenchmarkDotNet" Version="0.15.6" />
<PackageVersion Include="BlazorMonaco" Version="3.4.0" /> <PackageVersion Include="BlazorMonaco" Version="3.4.0" />
<PackageVersion Include="CliWrap" Version="3.9.0" /> <PackageVersion Include="CliWrap" Version="3.9.0" />
@@ -54,6 +55,7 @@
<PackageVersion Include="ParallelPipelines" Version="3.0.0" /> <PackageVersion Include="ParallelPipelines" Version="3.0.0" />
<PackageVersion Include="Photino.Blazor" Version="4.0.13" /> <PackageVersion Include="Photino.Blazor" Version="4.0.13" />
<PackageVersion Include="R3" Version="1.3.0" /> <PackageVersion Include="R3" Version="1.3.0" />
<PackageVersion Include="xunit.v3.mtp-v2" Version="3.2.0" />
<PackageVersion Include="XtermBlazor" Version="2.2.0" /> <PackageVersion Include="XtermBlazor" Version="2.2.0" />
</ItemGroup> </ItemGroup>
<ItemGroup Label="Aspire"> <ItemGroup Label="Aspire">

View File

@@ -48,6 +48,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
.github\workflows\create-release.yml = .github\workflows\create-release.yml .github\workflows\create-release.yml = .github\workflows\create-release.yml
EndProjectSection EndProjectSection
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpIDE.Application.UnitTests", "tests\SharpIDE.Application.UnitTests\SharpIDE.Application.UnitTests.csproj", "{17313240-0A0E-421E-8D33-FC7AD8669451}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@@ -142,6 +144,18 @@ Global
{52CD8910-88A4-4978-B107-C7B6C7FC3557}.Release|x64.Build.0 = Release|Any CPU {52CD8910-88A4-4978-B107-C7B6C7FC3557}.Release|x64.Build.0 = Release|Any CPU
{52CD8910-88A4-4978-B107-C7B6C7FC3557}.Release|x86.ActiveCfg = Release|Any CPU {52CD8910-88A4-4978-B107-C7B6C7FC3557}.Release|x86.ActiveCfg = Release|Any CPU
{52CD8910-88A4-4978-B107-C7B6C7FC3557}.Release|x86.Build.0 = Release|Any CPU {52CD8910-88A4-4978-B107-C7B6C7FC3557}.Release|x86.Build.0 = Release|Any CPU
{17313240-0A0E-421E-8D33-FC7AD8669451}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{17313240-0A0E-421E-8D33-FC7AD8669451}.Debug|Any CPU.Build.0 = Debug|Any CPU
{17313240-0A0E-421E-8D33-FC7AD8669451}.Debug|x64.ActiveCfg = Debug|Any CPU
{17313240-0A0E-421E-8D33-FC7AD8669451}.Debug|x64.Build.0 = Debug|Any CPU
{17313240-0A0E-421E-8D33-FC7AD8669451}.Debug|x86.ActiveCfg = Debug|Any CPU
{17313240-0A0E-421E-8D33-FC7AD8669451}.Debug|x86.Build.0 = Debug|Any CPU
{17313240-0A0E-421E-8D33-FC7AD8669451}.Release|Any CPU.ActiveCfg = Release|Any CPU
{17313240-0A0E-421E-8D33-FC7AD8669451}.Release|Any CPU.Build.0 = Release|Any CPU
{17313240-0A0E-421E-8D33-FC7AD8669451}.Release|x64.ActiveCfg = Release|Any CPU
{17313240-0A0E-421E-8D33-FC7AD8669451}.Release|x64.Build.0 = Release|Any CPU
{17313240-0A0E-421E-8D33-FC7AD8669451}.Release|x86.ActiveCfg = Release|Any CPU
{17313240-0A0E-421E-8D33-FC7AD8669451}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@@ -155,5 +169,6 @@ Global
{D306410D-3A28-4F1B-A09B-CA10041A7C53} = {F4ED837F-888A-4D01-BCED-C360B9CE0865} {D306410D-3A28-4F1B-A09B-CA10041A7C53} = {F4ED837F-888A-4D01-BCED-C360B9CE0865}
{52CD8910-88A4-4978-B107-C7B6C7FC3557} = {E239E6C6-8915-4F03-85B7-22AEAF281D14} {52CD8910-88A4-4978-B107-C7B6C7FC3557} = {E239E6C6-8915-4F03-85B7-22AEAF281D14}
{2FAF7C76-F2D6-443D-B3A8-3FA5C4E267C7} = {3852B2EE-7495-4DE1-805F-C198E3A9FF0D} {2FAF7C76-F2D6-443D-B3A8-3FA5C4E267C7} = {3852B2EE-7495-4DE1-805F-C198E3A9FF0D}
{17313240-0A0E-421E-8D33-FC7AD8669451} = {B6835010-35FA-4C74-AB48-009FB923185D}
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

View File

@@ -3,5 +3,8 @@
"version": "10.0.100", "version": "10.0.100",
"rollForward": "latestFeature", "rollForward": "latestFeature",
"allowPrerelease": false "allowPrerelease": false
},
"test": {
"runner": "Microsoft.Testing.Platform"
} }
} }

View File

@@ -0,0 +1,2 @@
global using Xunit;
global using AwesomeAssertions;

View File

@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
<!--
Microsoft Testing Platform docs
https://xunit.net/docs/getting-started/v3/microsoft-testing-platform
-->
</PropertyGroup>
<ItemGroup>
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AwesomeAssertions" />
<PackageReference Include="xunit.v3.mtp-v2" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,10 @@
namespace SharpIDE.Application.UnitTests;
public class UnitTest1
{
[Fact]
public void Test1()
{
true.Should().BeTrue();
}
}

View File

@@ -0,0 +1,3 @@
{
"$schema": "https://xunit.net/schema/current/xunit.runner.schema.json"
}