File tree Expand file tree Collapse file tree
src/NetEvolve.Extensions.Hosting.WinForms
NetEvolve.Extensions.Hosting.WinForms.Tests.Architecture
NetEvolve.Extensions.Hosting.WinForms.Tests.Unit/Internals Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 with :
2626 enableSonarQube : true
2727 dotnet-logging : ${{ inputs.dotnet-logging }}
28- dotnet-version : |
29- 6.x
30- 7.x
31- 8.x
28+ dotnet-version : ${{ vars.NE_DOTNET_TARGETFRAMEWORKS }}
3229 solution : ./Extensions.Hosting.WinForms.sln
3330 runs-on-build : windows-latest
3431 runs-on-tests : windows-latest
Original file line number Diff line number Diff line change 1010 <Import Project =" $(DirEngineeringSettings)tests.build.props" Condition =" '$(IsTestableProject)' == 'true' " />
1111
1212 <PropertyGroup >
13- <_TargetFrameworks >net6 .0-windows;net7.0-windows;net8 .0-windows</_TargetFrameworks >
13+ <_TargetFrameworks >net8 .0-windows;net9 .0-windows</_TargetFrameworks >
1414 <EnableWindowsTargeting >true</EnableWindowsTargeting >
1515 </PropertyGroup >
1616
Original file line number Diff line number Diff line change 1515 <ItemGroup >
1616 <PackageVersion Include =" coverlet.collector" Version =" 6.0.2" />
1717 <PackageVersion Include =" coverlet.msbuild" Version =" 6.0.2" />
18- <PackageVersion Include =" Microsoft.Extensions.Hosting" Version =" 8.0.1" />
19- <PackageVersion Update =" Microsoft.Extensions.Hosting" Version =" 8.0.1" Condition =" '$(TargetFramework)' == 'net7.0-windows' " />
20- <PackageVersion Update =" Microsoft.Extensions.Hosting" Version =" 8.0.1" Condition =" '$(TargetFramework)' == 'net6.0-windows' " />
21- <PackageVersion Include =" Microsoft.Extensions.Hosting.Abstractions" Version =" 8.0.1" />
22- <PackageVersion Update =" Microsoft.Extensions.Hosting.Abstractions" Version =" 8.0.1" Condition =" '$(TargetFramework)' == 'net7.0-windows' " />
23- <PackageVersion Update =" Microsoft.Extensions.Hosting.Abstractions" Version =" 8.0.1" Condition =" '$(TargetFramework)' == 'net6.0-windows' " />
18+ <PackageVersion Include =" Microsoft.Extensions.Hosting" Version =" 9.0.0" />
19+ <PackageVersion Update =" Microsoft.Extensions.Hosting" Version =" 8.0.1" Condition =" '$(TargetFramework)' == 'net8.0-windows' " />
20+ <PackageVersion Include =" Microsoft.Extensions.Hosting.Abstractions" Version =" 9.0.0" />
21+ <PackageVersion Update =" Microsoft.Extensions.Hosting.Abstractions" Version =" 8.0.1" Condition =" '$(TargetFramework)' == 'net8.0-windows' " />
2422 <PackageVersion Include =" Microsoft.NET.Test.Sdk" Version =" 17.11.1" />
2523 <PackageVersion Include =" NetEvolve.Extensions.XUnit" Version =" 2.3.1" />
2624 <PackageVersion Include =" NSubstitute" Version =" 5.3.0" />
Original file line number Diff line number Diff line change @@ -158,8 +158,8 @@ public static HostApplicationBuilder UseWindowsForms<TApplicationContext>(
158158
159159 var services = contextFactory is null
160160 ? builder . Services . AddSingleton < ApplicationContext , TApplicationContext > ( )
161- : builder . Services . AddSingleton < ApplicationContext , TApplicationContext > ( sp =>
162- contextFactory . Invoke ( sp )
161+ : builder . Services . AddSingleton < ApplicationContext , TApplicationContext > (
162+ contextFactory . Invoke
163163 ) ;
164164
165165 _ = services
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ public async ValueTask<T> GetFormularAsync<T>()
5858 try
5959 {
6060 return await synchronizationContext
61- . InvokeAsync ( ( ) => serviceProvider . GetRequiredService < T > ( ) ) !
61+ . InvokeAsync ( serviceProvider . GetRequiredService < T > ) !
6262 . ConfigureAwait ( false ) ;
6363 }
6464 finally
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ internal static class ProjectArchitecture
99{
1010 // TIP: load your architecture once at the start to maximize performance of your tests
1111 private static readonly Lazy < Architecture > _instance = new Lazy < Architecture > (
12- ( ) => LoadArchitecture ( ) ,
12+ LoadArchitecture ,
1313 LazyThreadSafetyMode . PublicationOnly
1414 ) ;
1515
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ public void GetFormular_InvalidForm_ThrowsInvalidOperationException()
4343
4444 // Act / Assert
4545 _ = Assert . Throws < InvalidOperationException > (
46- ( ) => formularProvider . GetFormular < TestFormNotRegistered > ( )
46+ formularProvider . GetFormular < TestFormNotRegistered >
4747 ) ;
4848 }
4949
@@ -117,7 +117,7 @@ public void GetScopedForm_InvalidForm_ThrowsInvalidOperationException()
117117
118118 // Act / Assert
119119 _ = Assert . Throws < InvalidOperationException > (
120- ( ) => formularProvider . GetScopedForm < TestFormNotRegistered > ( )
120+ formularProvider . GetScopedForm < TestFormNotRegistered >
121121 ) ;
122122 }
123123
@@ -272,7 +272,7 @@ public void GetMainFormular_InvalidForm_ThrowsInvalidOperationException()
272272 using var formularProvider = new FormularProvider ( serviceProvider , synchronizationContext ) ;
273273
274274 // Act / Assert
275- _ = Assert . Throws < InvalidOperationException > ( ( ) => formularProvider . GetMainFormular ( ) ) ;
275+ _ = Assert . Throws < InvalidOperationException > ( formularProvider . GetMainFormular ) ;
276276 }
277277
278278 [ Fact ]
You can’t perform that action at this time.
0 commit comments