File tree Expand file tree Collapse file tree 5 files changed +36
-6
lines changed
Expand file tree Collapse file tree 5 files changed +36
-6
lines changed Original file line number Diff line number Diff line change 4141 <None Remove =" template\CounterRazorTests.razor" />
4242 </ItemGroup >
4343
44+ <ItemGroup >
45+ <Folder Include =" temp\" />
46+ </ItemGroup >
47+
4448</Project >
Original file line number Diff line number Diff line change 1717 " --framework xunit --sdk net8.0" ,
1818 " --framework xunitv3 --sdk net8.0" ,
1919 " --framework nunit --sdk net8.0" ,
20- " --framework mstest --sdk net8.0"
20+ " --framework mstest --sdk net8.0" ,
21+ " --framework tunit --sdk net8.0"
2122 ]
2223}
Original file line number Diff line number Diff line change 2323 {
2424 "modifiers" : [
2525 {
26- "exclude" : [ " BunitTestContext.cs " ],
27- "condition" : " (testFramework_xunit || testFramework_xunitv3 )"
26+ "exclude" : [ " _Imports.razor " , " CounterRazorTests.razor " ],
27+ "condition" : " (testFramework_tunit )"
2828 }
2929 ]
3030 }
6767 "choice" : " mstest" ,
6868 "description" : " MSTest unit testing framework" ,
6969 "displayName" : " MSTest"
70+ },
71+ {
72+ "choice" : " tunit" ,
73+ "description" : " TUnit unit testing framework" ,
74+ "displayName" : " TUnit"
7075 }
7176 ]
7277 },
8691 "type" : " computed" ,
8792 "value" : " UnitTestFramework == \" mstest\" "
8893 },
94+ "testFramework_tunit" : {
95+ "type" : " computed" ,
96+ "value" : " UnitTestFramework == \" tunit\" "
97+ },
8998 "targetSdk" : {
9099 "type" : " parameter" ,
91100 "description" : " The target framework sdk for the project." ,
Original file line number Diff line number Diff line change 1+ <!-- #if (testFramework_tunit) -->
2+ <Project Sdk =" Microsoft.NET.Sdk" >
3+ <!-- #else -->
14<Project Sdk =" Microsoft.NET.Sdk.Razor" >
2-
5+ <!-- #endif -->
36 <PropertyGroup >
47 <TargetFramework >targetSdk</TargetFramework >
58 <Nullable >enable</Nullable >
69 <IsPackable >false</IsPackable >
10+ <OutputType Condition =" '$(testFramework_tunit)' == 'true'" >Exe</OutputType >
11+ <IsTestingPlatformApplication Condition =" '$(testFramework_tunit)' == 'true'" >false</IsTestingPlatformApplication >
712 </PropertyGroup >
813
914 <ItemGroup >
1823
1924 <ItemGroup >
2025 <PackageReference Include =" bunit" Version =" #{RELEASE_VERSION}#" />
21- <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.12.0" />
22- <PackageReference Include =" coverlet.collector" Version =" 6.0.3" >
26+ <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.12.0" Condition = " '$(testFramework_tunit)' != 'true' " />
27+ <PackageReference Include =" coverlet.collector" Version =" 6.0.3" Condition = " '$(testFramework_tunit)' != 'true' " >
2328 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
2429 <PrivateAssets >all</PrivateAssets >
2530 </PackageReference >
5156 <PackageReference Include =" MSTest.TestFramework" Version =" 3.6.4" />
5257 </ItemGroup >
5358
59+ <ItemGroup Condition =" '$(testFramework_tunit)' == 'true'" >
60+ <PackageReference Include =" TUnit" Version =" 0.6.154" />
61+ </ItemGroup >
62+
5463</Project >
Original file line number Diff line number Diff line change 1+ #if ( testFramework_tunit )
2+ using TUnit ;
3+ #endif
4+
15namespace Company . BlazorTests1 ;
26
37/// <summary>
@@ -14,6 +18,9 @@ public class CounterCSharpTest : BunitContext
1418#elif ( testFramework_mstest )
1519[ TestClass]
1620public class CounterCSharpTest : BunitContext
21+ #elif ( testFramework_tunit )
22+ [ Test]
23+ public class CounterCSharpTest : BunitContext
1724#endif
1825{
1926#if ( testFramework_xunit )
You can’t perform that action at this time.
0 commit comments