Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7c27e24

Browse files
committed
✅ test: 调整单元测试目标类库
1 parente3a3315 commit7c27e24

File tree

33 files changed

+161
-291
lines changed

33 files changed

+161
-291
lines changed

‎framework.props‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@
66

77
<ImportProject="./common.props"/>
88

9-
109
</Project>

‎framework.tests.props‎

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,36 @@
11
<Project>
22
<PropertyGroup>
3-
<TargetFrameworks>net9.0;net8.0;net7.0;net6.0;net5.0;netcoreapp3.1;</TargetFrameworks>
3+
<TargetFrameworks>net9.0;net8.0;net6.0;</TargetFrameworks>
44
</PropertyGroup>
55

66
<ImportProject="./common.tests.props"/>
77

8+
<PropertyGroup>
9+
<!-- 如果没有DI的需求,则将EnableDITestPackages设置为false-->
10+
<EnableDITestPackages>true</EnableDITestPackages>
11+
</PropertyGroup>
12+
13+
<ItemGroupCondition=" '$(EnableDITestPackages)' == 'true'">
14+
<PackageReferenceInclude="Xunit.DependencyInjection.Logging"Version="8.1.0" />
15+
<PackageReferenceInclude="AspectCore.Extensions.Hosting"Version="2.4.0" />
16+
</ItemGroup>
17+
18+
<ItemGroupCondition="'$(EnableDITestPackages)' == 'true' and '$(TargetFramework)' == 'net6.0'">
19+
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="6.0.36" />
20+
<PackageReferenceInclude="Microsoft.Extensions.Hosting"Version="6.0.1" />
21+
<PackageReferenceInclude="Xunit.DependencyInjection"Version="8.9.0" />
22+
</ItemGroup>
23+
24+
<ItemGroupCondition=" '$(EnableDITestPackages)' == 'true' and '$(TargetFramework)' == 'net8.0'">
25+
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="8.0.16" />
26+
<PackageReferenceInclude="Microsoft.Extensions.Hosting"Version="8.0.1" />
27+
<PackageReferenceInclude="Xunit.DependencyInjection"Version="9.9.0" />
28+
</ItemGroup>
29+
30+
<ItemGroupCondition=" '$(EnableDITestPackages)' == 'true' and '$(TargetFramework)' == 'net9.0'">
31+
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="9.0.5" />
32+
<PackageReferenceInclude="Microsoft.Extensions.Hosting"Version="9.0.5" />
33+
<PackageReferenceInclude="Xunit.DependencyInjection"Version="9.9.0" />
34+
</ItemGroup>
35+
836
</Project>

‎framework/tests/Bing.Aop.AspectCore.Tests/Bing.Aop.AspectCore.Tests.csproj‎

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,4 @@
99
<XunitStartupFullName>Bing.Aop.AspectCore.Startup</XunitStartupFullName>
1010
</PropertyGroup>
1111

12-
<ItemGroup>
13-
<PackageReferenceInclude="Xunit.DependencyInjection.Logging"Version="8.1.0" />
14-
<PackageReferenceInclude="AspectCore.Extensions.Hosting"Version="2.4.0" />
15-
</ItemGroup>
16-
17-
<ItemGroupCondition=" '$(TargetFramework)' == 'netcoreapp3.1'">
18-
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="3.1.32" />
19-
<PackageReferenceInclude="Xunit.DependencyInjection"Version="8.9.0" />
20-
</ItemGroup>
21-
22-
<ItemGroupCondition=" '$(TargetFramework)' == 'net5.0'">
23-
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="5.0.17" />
24-
<PackageReferenceInclude="Xunit.DependencyInjection"Version="8.9.0" />
25-
</ItemGroup>
26-
27-
<ItemGroupCondition=" '$(TargetFramework)' == 'net6.0'">
28-
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="6.0.14" />
29-
<PackageReferenceInclude="Xunit.DependencyInjection"Version="8.9.0" />
30-
</ItemGroup>
31-
32-
<ItemGroupCondition=" '$(TargetFramework)' == 'net7.0'">
33-
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="7.0.8" />
34-
<PackageReferenceInclude="Xunit.DependencyInjection"Version="8.9.0" />
35-
</ItemGroup>
36-
37-
<ItemGroupCondition=" '$(TargetFramework)' == 'net8.0'">
38-
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="8.0.14" />
39-
<PackageReferenceInclude="Xunit.DependencyInjection"Version="9.9.0" />
40-
</ItemGroup>
41-
42-
<ItemGroupCondition=" '$(TargetFramework)' == 'net9.0'">
43-
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="8.0.14" />
44-
<PackageReferenceInclude="Xunit.DependencyInjection"Version="9.9.0" />
45-
</ItemGroup>
46-
4712
</Project>

‎framework/tests/Bing.AspNetCore.Mvc.Tests/Bing.AspNetCore.Mvc.Tests.csproj‎

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<ProjectSdk="Microsoft.NET.Sdk.Web">
2-
<ImportProject="..\..\..\common.tests.props" />
2+
<ImportProject="..\..\..\framework.tests.props" />
33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;</TargetFrameworks>
54
<RootNamespace />
65
</PropertyGroup>
76

@@ -10,34 +9,8 @@
109
</PropertyGroup>
1110

1211
<ItemGroup>
13-
<PackageReferenceInclude="AspectCore.Extensions.Hosting"Version="2.4.0" />
14-
<PackageReferenceInclude="Bing.Utils.Http"Version="1.5.0-preview-20240229-1" />
12+
<PackageReferenceInclude="Bing.Utils.Http"Version="1.5.0" />
1513
<PackageReferenceInclude="Microsoft.AspNetCore.Mvc.NewtonsoftJson"Version="6.0.27" />
16-
<PackageReferenceInclude="Xunit.DependencyInjection.Logging"Version="8.0.1" />
17-
</ItemGroup>
18-
19-
<ItemGroupCondition=" '$(TargetFramework)' == 'netcoreapp3.1'">
20-
<PackageReferenceInclude="Microsoft.Extensions.Hosting"Version="3.1.32" />
21-
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="3.1.32" />
22-
<PackageReferenceInclude="Xunit.DependencyInjection"Version="8.5.0" />
23-
</ItemGroup>
24-
25-
<ItemGroupCondition=" '$(TargetFramework)' == 'net5.0'">
26-
<PackageReferenceInclude="Microsoft.Extensions.Hosting"Version="5.0.0" />
27-
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="5.0.17" />
28-
<PackageReferenceInclude="Xunit.DependencyInjection"Version="8.5.0" />
29-
</ItemGroup>
30-
31-
<ItemGroupCondition=" '$(TargetFramework)' == 'net6.0'">
32-
<PackageReferenceInclude="Microsoft.Extensions.Hosting"Version="6.0.1" />
33-
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="6.0.27" />
34-
<PackageReferenceInclude="Xunit.DependencyInjection"Version="8.7.0" />
35-
</ItemGroup>
36-
37-
<ItemGroupCondition=" '$(TargetFramework)' == 'net7.0'">
38-
<PackageReferenceInclude="Microsoft.Extensions.Hosting"Version="7.0.1" />
39-
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="7.0.14" />
40-
<PackageReferenceInclude="Xunit.DependencyInjection"Version="8.7.0" />
4114
</ItemGroup>
4215

4316
<ItemGroup>

‎framework/tests/Bing.Auditing.Tests/Bing.Auditing.Tests.csproj‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<ProjectSdk="Microsoft.NET.Sdk">
2-
<ImportProject="..\..\..\common.tests.props" />
2+
<ImportProject="..\..\..\framework.tests.props" />
3+
34
<PropertyGroup>
4-
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1;</TargetFrameworks>
5+
<EnableDITestPackages>false</EnableDITestPackages>
56
</PropertyGroup>
7+
68
<ItemGroup>
79
<ProjectReferenceInclude="..\..\src\Bing.Auditing\Bing.Auditing.csproj" />
810
</ItemGroup>

‎framework/tests/Bing.AutoMapper.Tests/Bing.AutoMapper.Tests.csproj‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
<ImportProject="..\..\..\framework.tests.props" />
33
<PropertyGroup>
44
<RootNamespace />
5-
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1;</TargetFrameworks>
5+
<TargetFrameworks>net6.0;</TargetFrameworks>
6+
</PropertyGroup>
7+
8+
<PropertyGroup>
9+
<EnableDITestPackages>false</EnableDITestPackages>
610
</PropertyGroup>
711

812
<ItemGroup>
913
<ProjectReferenceInclude="..\..\src\Bing.AutoMapper\Bing.AutoMapper.csproj" />
1014
<ProjectReferenceInclude="..\..\src\Bing.Ddd.Application\Bing.Ddd.Application.csproj" />
1115
</ItemGroup>
1216

13-
<ItemGroupCondition=" '$(TargetFramework)' == 'net7.0'">
14-
<PackageReferenceInclude="AutoMapper"Version="13.0.1" />
15-
</ItemGroup>
16-
1717
<ItemGroupCondition=" '$(TargetFramework)' == 'net8.0'">
1818
<PackageReferenceInclude="AutoMapper"Version="13.0.1" />
1919
</ItemGroup>

‎framework/tests/Bing.Caching.CSRedis.Tests.Integration/Bing.Caching.CSRedis.Tests.Integration.csproj‎

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,10 @@
11
<ProjectSdk="Microsoft.NET.Sdk">
2-
<ImportProject="..\..\..\common.tests.props" />
2+
<ImportProject="..\..\..\framework.tests.props" />
33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;</TargetFrameworks>
54
<RootNamespace>Bing.Caching.CSRedis.Tests</RootNamespace>
65
<XunitStartupFullName>Bing.Caching.CSRedis.Tests.Startup</XunitStartupFullName>
76
</PropertyGroup>
87

9-
<ItemGroup>
10-
<PackageReferenceInclude="Xunit.DependencyInjection.Logging"Version="8.0.1" />
11-
</ItemGroup>
12-
13-
<ItemGroupCondition=" '$(TargetFramework)' == 'netcoreapp3.1'">
14-
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="3.1.32" />
15-
<PackageReferenceInclude="Xunit.DependencyInjection"Version="8.5.0" />
16-
</ItemGroup>
17-
18-
<ItemGroupCondition=" '$(TargetFramework)' == 'net5.0'">
19-
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="5.0.17" />
20-
<PackageReferenceInclude="Xunit.DependencyInjection"Version="8.5.0" />
21-
</ItemGroup>
22-
23-
<ItemGroupCondition=" '$(TargetFramework)' == 'net6.0'">
24-
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="6.0.14" />
25-
<PackageReferenceInclude="Xunit.DependencyInjection"Version="8.7.0" />
26-
</ItemGroup>
27-
28-
<ItemGroupCondition=" '$(TargetFramework)' == 'net7.0'">
29-
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="7.03" />
30-
<PackageReferenceInclude="Xunit.DependencyInjection"Version="8.7.0" />
31-
</ItemGroup>
32-
338
<ItemGroup>
349
<ProjectReferenceInclude="..\..\src\Bing.Caching.CSRedis\Bing.Caching.CSRedis.csproj" />
3510
</ItemGroup>

‎framework/tests/Bing.Caching.FreeRedis.Tests.Integration/Bing.Caching.FreeRedis.Tests.Integration.csproj‎

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,10 @@
11
<ProjectSdk="Microsoft.NET.Sdk">
2-
<ImportProject="..\..\..\common.tests.props" />
2+
<ImportProject="..\..\..\framework.tests.props" />
33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;</TargetFrameworks>
54
<RootNamespace>Bing.Caching.FreeRedis.Tests</RootNamespace>
65
<XunitStartupFullName>Bing.Caching.FreeRedis.Tests.Startup</XunitStartupFullName>
76
</PropertyGroup>
87

9-
<ItemGroup>
10-
<PackageReferenceInclude="Xunit.DependencyInjection.Logging"Version="8.0.1" />
11-
</ItemGroup>
12-
13-
<ItemGroupCondition=" '$(TargetFramework)' == 'netcoreapp3.1'">
14-
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="3.1.32" />
15-
<PackageReferenceInclude="Xunit.DependencyInjection"Version="8.5.0" />
16-
</ItemGroup>
17-
18-
<ItemGroupCondition=" '$(TargetFramework)' == 'net5.0'">
19-
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="5.0.17" />
20-
<PackageReferenceInclude="Xunit.DependencyInjection"Version="8.5.0" />
21-
</ItemGroup>
22-
23-
<ItemGroupCondition=" '$(TargetFramework)' == 'net6.0'">
24-
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="6.0.14" />
25-
<PackageReferenceInclude="Xunit.DependencyInjection"Version="8.7.0" />
26-
</ItemGroup>
27-
28-
<ItemGroupCondition=" '$(TargetFramework)' == 'net7.0'">
29-
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="7.03" />
30-
<PackageReferenceInclude="Xunit.DependencyInjection"Version="8.7.0" />
31-
</ItemGroup>
32-
338
<ItemGroup>
349
<ProjectReferenceInclude="..\..\src\Bing.Caching.FreeRedis\Bing.Caching.FreeRedis.csproj" />
3510
</ItemGroup>

‎framework/tests/Bing.Core.Tests/Bing.Core.Tests.csproj‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<RootNamespace>Bing.Tests</RootNamespace>
66
</PropertyGroup>
77

8+
<PropertyGroup>
9+
<EnableDITestPackages>false</EnableDITestPackages>
10+
</PropertyGroup>
11+
812
<ItemGroup>
913
<PackageReferenceInclude="AspectCore.Core"Version="2.4.0" />
1014
</ItemGroup>

‎framework/tests/Bing.Dapper.MySql.Tests.Integration/Bing.Dapper.MySql.Tests.Integration.csproj‎

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,10 @@
11
<ProjectSdk="Microsoft.NET.Sdk">
2-
<ImportProject="..\..\..\common.tests.props" />
2+
<ImportProject="..\..\..\framework.tests.props" />
33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;</TargetFrameworks>
54
<RootNamespace>Bing.Dapper.Tests</RootNamespace>
65
<XunitStartupFullName>Bing.Dapper.Tests.Startup</XunitStartupFullName>
76
</PropertyGroup>
87

9-
<ItemGroup>
10-
<PackageReferenceInclude="Xunit.DependencyInjection.Logging"Version="8.1.0" />
11-
<PackageReferenceInclude="AspectCore.Extensions.Hosting"Version="2.3.0" />
12-
</ItemGroup>
13-
14-
<ItemGroupCondition=" '$(TargetFramework)' == 'netcoreapp3.1'">
15-
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="3.1.32" />
16-
<PackageReferenceInclude="Xunit.DependencyInjection"Version="8.5.0" />
17-
</ItemGroup>
18-
19-
<ItemGroupCondition=" '$(TargetFramework)' == 'net5.0'">
20-
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="5.0.17" />
21-
<PackageReferenceInclude="Xunit.DependencyInjection"Version="8.5.0" />
22-
</ItemGroup>
23-
24-
<ItemGroupCondition=" '$(TargetFramework)' == 'net6.0'">
25-
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="6.0.14" />
26-
<PackageReferenceInclude="Xunit.DependencyInjection"Version="8.9.0" />
27-
</ItemGroup>
28-
29-
<ItemGroupCondition=" '$(TargetFramework)' == 'net7.0'">
30-
<PackageReferenceInclude="Microsoft.AspNetCore.TestHost"Version="7.0.8" />
31-
<PackageReferenceInclude="Xunit.DependencyInjection"Version="8.9.0" />
32-
</ItemGroup>
33-
348
<ItemGroup>
359
<ProjectReferenceInclude="..\..\src\Bing.Dapper.MySql\Bing.Dapper.MySql.csproj" />
3610
<ProjectReferenceInclude="..\Bing.TestShare.MySql\Bing.TestShare.MySql.csproj" />

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp