File tree Expand file tree Collapse file tree 5 files changed +16
-15
lines changed
test/Soenneker.Utils.BackgroundQueue.Tests Expand file tree Collapse file tree 5 files changed +16
-15
lines changed Original file line number Diff line number Diff line change 11using System . Threading . Tasks ;
22using Soenneker . Utils . BackgroundQueue . Abstract ;
33using Xunit ;
4- using Xunit . Abstractions ;
4+
55
66namespace Soenneker . Utils . BackgroundQueue . Tests ;
77
Original file line number Diff line number Diff line change 1- using System . Threading . Tasks ;
1+ using System . Threading . Tasks ;
22using Microsoft . Extensions . Configuration ;
33using Microsoft . Extensions . DependencyInjection ;
44using Microsoft . Extensions . DependencyInjection . Extensions ;
@@ -13,7 +13,7 @@ namespace Soenneker.Utils.BackgroundQueue.Tests;
1313
1414public class Fixture : UnitFixture
1515{
16- public override async Task InitializeAsync ( )
16+ public override async ValueTask InitializeAsync ( )
1717 {
1818 SetupIoC ( Services ) ;
1919
@@ -33,7 +33,7 @@ private static void SetupIoC(IServiceCollection services)
3333 services . AddBackgroundQueue ( ) ;
3434 }
3535
36- public override async Task DisposeAsync ( )
36+ public override async ValueTask DisposeAsync ( )
3737 {
3838 if ( ServiceProvider != null )
3939 await ServiceProvider . StopBackgroundQueue ( ) . NoSync ( ) ;
Original file line number Diff line number Diff line change 1- using System ;
1+ using System ;
22using System . Threading ;
33using System . Threading . Tasks ;
44using Microsoft . Extensions . DependencyInjection ;
1212using Soenneker . Tests . Unit ;
1313using Soenneker . Utils . BackgroundQueue . Abstract ;
1414using Soenneker . Utils . BackgroundQueue . Tests . Abstract ;
15- using Xunit . Abstractions ;
15+ using Xunit ;
16+
1617
1718namespace Soenneker . Utils . BackgroundQueue . Tests ;
1819
@@ -91,12 +92,12 @@ public async ValueTask WaitOnQueueToEmpty()
9192 } while ( isProcessing ) ;
9293 }
9394
94- public Task InitializeAsync ( )
95+ public ValueTask InitializeAsync ( )
9596 {
96- return Task . CompletedTask ;
97+ return ValueTask . CompletedTask ;
9798 }
9899
99- public async Task DisposeAsync ( )
100+ public async ValueTask DisposeAsync ( )
100101 {
101102 GC . SuppressFinalize ( this ) ;
102103
Original file line number Diff line number Diff line change 2828 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
2929 <PrivateAssets >all</PrivateAssets >
3030 </PackageReference >
31- <PackageReference Include =" Soenneker.Tests.Unit" Version =" 3.0.525 " />
32- </ItemGroup >
31+ <PackageReference Include =" Soenneker.Tests.Unit" Version =" 3.0.534 " />
32+ <PackageReference Include = " xUnit.v3 " Version = " 1.0.0 " />< /ItemGroup >
3333
3434 <ItemGroup >
3535 <ProjectReference Include =" ..\..\src\Soenneker.Utils.BackgroundQueue.csproj" />
Original file line number Diff line number Diff line change 1- using System ;
1+ using System ;
22using System . Threading . Tasks ;
33using Microsoft . Extensions . DependencyInjection ;
44using Serilog ;
@@ -38,14 +38,14 @@ public UnitFixture()
3838 Log . Logger = serilogLogger ;
3939 }
4040
41- public virtual Task InitializeAsync ( )
41+ public virtual ValueTask InitializeAsync ( )
4242 {
4343 ServiceProvider = Services . BuildServiceProvider ( ) ;
4444
45- return Task . CompletedTask ;
45+ return ValueTask . CompletedTask ;
4646 }
4747
48- public virtual async Task DisposeAsync ( )
48+ public virtual async ValueTask DisposeAsync ( )
4949 {
5050 GC . SuppressFinalize ( this ) ;
5151
You can’t perform that action at this time.
0 commit comments