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 1
1
using System . Threading . Tasks ;
2
2
using Soenneker . Utils . BackgroundQueue . Abstract ;
3
3
using Xunit ;
4
- using Xunit . Abstractions ;
4
+
5
5
6
6
namespace Soenneker . Utils . BackgroundQueue . Tests ;
7
7
Original file line number Diff line number Diff line change 1
- using System . Threading . Tasks ;
1
+ using System . Threading . Tasks ;
2
2
using Microsoft . Extensions . Configuration ;
3
3
using Microsoft . Extensions . DependencyInjection ;
4
4
using Microsoft . Extensions . DependencyInjection . Extensions ;
@@ -13,7 +13,7 @@ namespace Soenneker.Utils.BackgroundQueue.Tests;
13
13
14
14
public class Fixture : UnitFixture
15
15
{
16
- public override async Task InitializeAsync ( )
16
+ public override async ValueTask InitializeAsync ( )
17
17
{
18
18
SetupIoC ( Services ) ;
19
19
@@ -33,7 +33,7 @@ private static void SetupIoC(IServiceCollection services)
33
33
services . AddBackgroundQueue ( ) ;
34
34
}
35
35
36
- public override async Task DisposeAsync ( )
36
+ public override async ValueTask DisposeAsync ( )
37
37
{
38
38
if ( ServiceProvider != null )
39
39
await ServiceProvider . StopBackgroundQueue ( ) . NoSync ( ) ;
Original file line number Diff line number Diff line change 1
- using System ;
1
+ using System ;
2
2
using System . Threading ;
3
3
using System . Threading . Tasks ;
4
4
using Microsoft . Extensions . DependencyInjection ;
12
12
using Soenneker . Tests . Unit ;
13
13
using Soenneker . Utils . BackgroundQueue . Abstract ;
14
14
using Soenneker . Utils . BackgroundQueue . Tests . Abstract ;
15
- using Xunit . Abstractions ;
15
+ using Xunit ;
16
+
16
17
17
18
namespace Soenneker . Utils . BackgroundQueue . Tests ;
18
19
@@ -91,12 +92,12 @@ public async ValueTask WaitOnQueueToEmpty()
91
92
} while ( isProcessing ) ;
92
93
}
93
94
94
- public Task InitializeAsync ( )
95
+ public ValueTask InitializeAsync ( )
95
96
{
96
- return Task . CompletedTask ;
97
+ return ValueTask . CompletedTask ;
97
98
}
98
99
99
- public async Task DisposeAsync ( )
100
+ public async ValueTask DisposeAsync ( )
100
101
{
101
102
GC . SuppressFinalize ( this ) ;
102
103
Original file line number Diff line number Diff line change 28
28
<IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
29
29
<PrivateAssets >all</PrivateAssets >
30
30
</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 >
33
33
34
34
<ItemGroup >
35
35
<ProjectReference Include =" ..\..\src\Soenneker.Utils.BackgroundQueue.csproj" />
Original file line number Diff line number Diff line change 1
- using System ;
1
+ using System ;
2
2
using System . Threading . Tasks ;
3
3
using Microsoft . Extensions . DependencyInjection ;
4
4
using Serilog ;
@@ -38,14 +38,14 @@ public UnitFixture()
38
38
Log . Logger = serilogLogger ;
39
39
}
40
40
41
- public virtual Task InitializeAsync ( )
41
+ public virtual ValueTask InitializeAsync ( )
42
42
{
43
43
ServiceProvider = Services . BuildServiceProvider ( ) ;
44
44
45
- return Task . CompletedTask ;
45
+ return ValueTask . CompletedTask ;
46
46
}
47
47
48
- public virtual async Task DisposeAsync ( )
48
+ public virtual async ValueTask DisposeAsync ( )
49
49
{
50
50
GC . SuppressFinalize ( this ) ;
51
51
You can’t perform that action at this time.
0 commit comments