Skip to content

Commit 5cdcb14

Browse files
committed
xUnit update; remove xUnit warnings
1 parent 46d3076 commit 5cdcb14

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

test/Serilog.Sinks.Async.PerformanceTests/Serilog.Sinks.Async.PerformanceTests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
<ItemGroup>
2020
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
21-
<PackageReference Include="xunit" Version="2.2.0" />
22-
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
21+
<PackageReference Include="xunit" Version="2.3.1" />
22+
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
2323
<PackageReference Include="BenchmarkDotNet" Version="0.10.6" />
2424
<PackageReference Include="Serilog.Sinks.File" Version="3.1.0" />
2525
</ItemGroup>

test/Serilog.Sinks.Async.Tests/BackgroundWorkerSinkIntegrationSpec.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public void WhenAuditSingle_ThenQueued()
130130

131131
var result = RetrieveEvents(_memorySink, 1);
132132

133-
Assert.Equal(1, result.Count);
133+
Assert.Single(result);
134134
}
135135

136136
[Fact]

test/Serilog.Sinks.Async.Tests/BackgroundWorkerSinkSpec.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public async Task WhenEmitSingle_ThenRelaysToInnerSink()
3939

4040
await Task.Delay(TimeSpan.FromSeconds(3));
4141

42-
Assert.Equal(1, _innerSink.Events.Count);
42+
Assert.Single(_innerSink.Events);
4343
}
4444
}
4545

@@ -88,7 +88,7 @@ public async Task WhenQueueFull_ThenDropsEvents()
8888
{
8989
using (var sink = new BackgroundWorkerSink(_logger, 1, false))
9090
{
91-
// Cause a delay when emmitting to the inner sink, allowing us to fill the queue to capacity
91+
// Cause a delay when emmitting to the inner sink, allowing us to fill the queue to capacity
9292
// after the first event is popped
9393
_innerSink.DelayEmit = TimeSpan.FromMilliseconds(300);
9494

@@ -109,7 +109,7 @@ public async Task WhenQueueFull_ThenDropsEvents()
109109
Assert.True(sw.ElapsedMilliseconds < 200, "Should not block the caller when the queue is full");
110110
});
111111

112-
// If we *weren't* dropped events, the delay in the inner sink would mean the 5 events would take
112+
// If we *weren't* dropped events, the delay in the inner sink would mean the 5 events would take
113113
// at least 15 seconds to process
114114
await Task.Delay(TimeSpan.FromSeconds(2));
115115

@@ -123,7 +123,7 @@ public async Task WhenQueueFull_ThenBlocks()
123123
{
124124
using (var sink = new BackgroundWorkerSink(_logger, 1, true))
125125
{
126-
// Cause a delay when emmitting to the inner sink, allowing us to fill the queue to capacity
126+
// Cause a delay when emmitting to the inner sink, allowing us to fill the queue to capacity
127127
// after the first event is popped
128128
_innerSink.DelayEmit = TimeSpan.FromMilliseconds(300);
129129

@@ -141,7 +141,7 @@ public async Task WhenQueueFull_ThenBlocks()
141141
sink.Emit(e);
142142
sw.Stop();
143143

144-
// Emit should return immediately the first time, since the queue is not yet full. On
144+
// Emit should return immediately the first time, since the queue is not yet full. On
145145
// subsequent calls, the queue should be full, so we should be blocked
146146
if (i > 0)
147147
{

test/Serilog.Sinks.Async.Tests/BackgroundWorkerSinkTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public void DisposeCompletesWithoutWorkPerformed()
3232
{
3333
}
3434

35-
Assert.Equal(0, collector.Events.Count);
35+
Assert.Empty(collector.Events);
3636
}
3737
}
3838
}

test/Serilog.Sinks.Async.Tests/Serilog.Sinks.Async.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
<ItemGroup>
1717
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
18-
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
19-
<PackageReference Include="xunit" Version="2.2.0" />
18+
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
19+
<PackageReference Include="xunit" Version="2.3.1" />
2020
</ItemGroup>
2121

2222
<ItemGroup>

0 commit comments

Comments
 (0)