Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.7" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageVersion Include="Moq" Version="4.20.72" />
<PackageVersion Include="MSTest" Version="3.9.3" />
<PackageVersion Include="MSTest" Version="3.10.0" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
<PackageVersion Include="prometheus-net.AspNetCore" Version="8.2.1" />
<PackageVersion Include="Sentry.AspNetCore" Version="5.12.0" />
<PackageVersion Include="Sentry.AspNetCore" Version="5.13.0" />
<PackageVersion Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="3.116.1" />
<PackageVersion Include="StackExchange.Redis" Version="2.8.41" />
<PackageVersion Include="StackExchange.Redis" Version="2.8.58" />
<PackageVersion Include="Telegram.Bot" Version="22.6.0" />
<PackageVersion Include="Telegram.Bot.AspNetCore" Version="22.5.0" />
<PackageVersion Include="TR.LPlus" Version="0.0.2-202502051717" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public async Task InvokeAsync_TokenThrowsException_NoCaptures()
.Verifiable(Times.Never);


var result = await Assert.ThrowsExceptionAsync<Exception>(async () => await
var result = await Assert.ThrowsExactlyAsync<Exception>(async () => await
new ExceptionHandlerMiddleware(
httpContextRequestBodyReader.Object,
httpContextRequestCollector.Object,
Expand Down Expand Up @@ -180,7 +180,7 @@ public async Task InvokeAsync_ReaderThrowsException_NoCaptures()
.Verifiable(Times.Never);


var result = await Assert.ThrowsExceptionAsync<Exception>(async () => await
var result = await Assert.ThrowsExactlyAsync<Exception>(async () => await
new ExceptionHandlerMiddleware(
httpContextRequestBodyReader.Object,
httpContextRequestCollector.Object,
Expand Down Expand Up @@ -332,7 +332,7 @@ public async Task InvokeAsync_NextAndCollectThrowException_NoCaptures()
.Verifiable(Times.Never);


var result = await Assert.ThrowsExceptionAsync<Exception>(async () => await
var result = await Assert.ThrowsExactlyAsync<Exception>(async () => await
new ExceptionHandlerMiddleware(
httpContextRequestBodyReader.Object,
httpContextRequestCollector.Object,
Expand Down Expand Up @@ -413,7 +413,7 @@ public async Task InvokeAsync_NextAndCaptureThrowException_NoCaptures()
.Verifiable(Times.Once);


var result = await Assert.ThrowsExceptionAsync<Exception>(async () => await
var result = await Assert.ThrowsExactlyAsync<Exception>(async () => await
new ExceptionHandlerMiddleware(
httpContextRequestBodyReader.Object,
httpContextRequestCollector.Object,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ public void NonSeekableStream_Tests()
Assert.AreEqual(innerStream.CanRead, nonSeekableStream.CanRead);
Assert.IsFalse(nonSeekableStream.CanSeek);
Assert.AreEqual(innerStream.CanWrite, nonSeekableStream.CanWrite);
Assert.ThrowsException<NotSupportedException>(() => nonSeekableStream.Length);
Assert.ThrowsException<NotSupportedException>(() => nonSeekableStream.Position);
Assert.ThrowsException<NotSupportedException>(() => nonSeekableStream.Position = 0);
Assert.ThrowsException<NotSupportedException>(() => nonSeekableStream.Seek(0, SeekOrigin.Begin));
Assert.ThrowsException<NotSupportedException>(() => nonSeekableStream.SetLength(0));
Assert.ThrowsExactly<NotSupportedException>(() => nonSeekableStream.Length);
Assert.ThrowsExactly<NotSupportedException>(() => nonSeekableStream.Position);
Assert.ThrowsExactly<NotSupportedException>(() => nonSeekableStream.Position = 0);
Assert.ThrowsExactly<NotSupportedException>(() => nonSeekableStream.Seek(0, SeekOrigin.Begin));
Assert.ThrowsExactly<NotSupportedException>(() => nonSeekableStream.SetLength(0));
}

private class NonSeekableStream(Stream inner) : Stream
Expand Down
6 changes: 3 additions & 3 deletions tests/Quizitor.Common.Tests/EnvironmentExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void GetEnvironmentVariableOrThrowIfNullOrWhiteSpace_VariableIsEmpty_Thro
Environment.SetEnvironmentVariable(variableName, variableValue);


Assert.ThrowsException<ArgumentNullException>(
Assert.ThrowsExactly<ArgumentNullException>(
() => variableName.GetEnvironmentVariableOrThrowIfNullOrWhiteSpace(),
$"Environment variable '{variableName}' is not defined.");
}
Expand All @@ -66,7 +66,7 @@ public void GetEnvironmentVariableOrThrowIfNullOrWhiteSpace_VariableIsWhiteSpace
Environment.SetEnvironmentVariable(variableName, variableValue);


Assert.ThrowsException<ArgumentNullException>(
Assert.ThrowsExactly<ArgumentNullException>(
() => variableName.GetEnvironmentVariableOrThrowIfNullOrWhiteSpace(),
$"Environment variable '{variableName}' is not defined.");
}
Expand All @@ -77,7 +77,7 @@ public void GetEnvironmentVariableOrThrowIfNullOrWhiteSpace_VariableNotExists_Th
var variableName = Unique.String();


Assert.ThrowsException<ArgumentNullException>(
Assert.ThrowsExactly<ArgumentNullException>(
() => variableName.GetEnvironmentVariableOrThrowIfNullOrWhiteSpace(),
$"Environment variable '{variableName}' is not defined.");
}
Expand Down