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 41
41
<None Remove =" template\CounterRazorTests.razor" />
42
42
</ItemGroup >
43
43
44
+ <ItemGroup >
45
+ <Folder Include =" temp\" />
46
+ </ItemGroup >
47
+
44
48
</Project >
Original file line number Diff line number Diff line change 17
17
" --framework xunit --sdk net8.0" ,
18
18
" --framework xunitv3 --sdk net8.0" ,
19
19
" --framework nunit --sdk net8.0" ,
20
- " --framework mstest --sdk net8.0"
20
+ " --framework mstest --sdk net8.0" ,
21
+ " --framework tunit --sdk net8.0"
21
22
]
22
23
}
Original file line number Diff line number Diff line change 23
23
{
24
24
"modifiers" : [
25
25
{
26
- "exclude" : [ " BunitTestContext.cs " ],
27
- "condition" : " (testFramework_xunit || testFramework_xunitv3 )"
26
+ "exclude" : [ " _Imports.razor " , " CounterRazorTests.razor " ],
27
+ "condition" : " (testFramework_tunit )"
28
28
}
29
29
]
30
30
}
67
67
"choice" : " mstest" ,
68
68
"description" : " MSTest unit testing framework" ,
69
69
"displayName" : " MSTest"
70
+ },
71
+ {
72
+ "choice" : " tunit" ,
73
+ "description" : " TUnit unit testing framework" ,
74
+ "displayName" : " TUnit"
70
75
}
71
76
]
72
77
},
86
91
"type" : " computed" ,
87
92
"value" : " UnitTestFramework == \" mstest\" "
88
93
},
94
+ "testFramework_tunit" : {
95
+ "type" : " computed" ,
96
+ "value" : " UnitTestFramework == \" tunit\" "
97
+ },
89
98
"targetSdk" : {
90
99
"type" : " parameter" ,
91
100
"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 -->
1
4
<Project Sdk =" Microsoft.NET.Sdk.Razor" >
2
-
5
+ <!-- #endif -->
3
6
<PropertyGroup >
4
7
<TargetFramework >targetSdk</TargetFramework >
5
8
<Nullable >enable</Nullable >
6
9
<IsPackable >false</IsPackable >
10
+ <OutputType Condition =" '$(testFramework_tunit)' == 'true'" >Exe</OutputType >
11
+ <IsTestingPlatformApplication Condition =" '$(testFramework_tunit)' == 'true'" >false</IsTestingPlatformApplication >
7
12
</PropertyGroup >
8
13
9
14
<ItemGroup >
18
23
19
24
<ItemGroup >
20
25
<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' " >
23
28
<IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
24
29
<PrivateAssets >all</PrivateAssets >
25
30
</PackageReference >
51
56
<PackageReference Include =" MSTest.TestFramework" Version =" 3.6.4" />
52
57
</ItemGroup >
53
58
59
+ <ItemGroup Condition =" '$(testFramework_tunit)' == 'true'" >
60
+ <PackageReference Include =" TUnit" Version =" 0.6.154" />
61
+ </ItemGroup >
62
+
54
63
</Project >
Original file line number Diff line number Diff line change
1
+ #if ( testFramework_tunit )
2
+ using TUnit ;
3
+ #endif
4
+
1
5
namespace Company . BlazorTests1 ;
2
6
3
7
/// <summary>
@@ -14,6 +18,9 @@ public class CounterCSharpTest : BunitContext
14
18
#elif ( testFramework_mstest )
15
19
[ TestClass]
16
20
public class CounterCSharpTest : BunitContext
21
+ #elif ( testFramework_tunit )
22
+ [ Test]
23
+ public class CounterCSharpTest : BunitContext
17
24
#endif
18
25
{
19
26
#if ( testFramework_xunit )
You can’t perform that action at this time.
0 commit comments