Skip to content

Commit 61c8a3d

Browse files
committed
Clean up
1 parent 32e2f76 commit 61c8a3d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Middleware/Diagnostics/test/UnitTests/ExceptionHandlerMiddlewareTest.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class ExceptionHandlerMiddlewareTest : LoggedTest
3434
public async Task ExceptionIsSetOnProblemDetailsContext()
3535
{
3636
// Arrange
37-
ExceptionHandlerSuppressDiagnosticsContext loggingContext = null;
37+
ExceptionHandlerSuppressDiagnosticsContext suppressContext = null;
3838
using var host = new HostBuilder()
3939
.ConfigureServices(services =>
4040
{
@@ -59,7 +59,7 @@ public async Task ExceptionIsSetOnProblemDetailsContext()
5959
{
6060
SuppressDiagnosticsCallback = context =>
6161
{
62-
loggingContext = context;
62+
suppressContext = context;
6363
return true;
6464
}
6565
});
@@ -85,8 +85,8 @@ public async Task ExceptionIsSetOnProblemDetailsContext()
8585
var originalExceptionMessage = ((JsonElement)body.Extensions["OriginalExceptionMessage"]).GetString();
8686
Assert.Equal("Test exception", originalExceptionMessage);
8787

88-
Assert.IsType<Exception>(loggingContext.Exception);
89-
Assert.Equal(ExceptionHandledType.ProblemDetailsService, loggingContext.ExceptionHandledBy);
88+
Assert.IsType<Exception>(suppressContext.Exception);
89+
Assert.Equal(ExceptionHandledType.ProblemDetailsService, suppressContext.ExceptionHandledBy);
9090
}
9191

9292
[Fact]
@@ -116,7 +116,7 @@ public async Task Invoke_ExceptionThrownResultsInClearedRouteValuesAndEndpoint()
116116
[Theory]
117117
[InlineData(ExceptionHandledType.ExceptionHandlerCallback, false)]
118118
[InlineData(ExceptionHandledType.ProblemDetailsService, true)]
119-
public async Task Invoke_HasExceptionHandler_SuppressLogging_CallbackRun(ExceptionHandledType suppressResult, bool logged)
119+
public async Task Invoke_HasExceptionHandler_SuppressDiagnostics_CallbackRun(ExceptionHandledType suppressResult, bool logged)
120120
{
121121
// Arrange
122122
var sink = new TestSink();
@@ -206,7 +206,7 @@ public async Task IExceptionHandlers_CallNextIfNotHandled()
206206
[InlineData(null)]
207207
[InlineData(true)]
208208
[InlineData(false)]
209-
public async Task IExceptionHandlers_SuppressLogging_TestLogs(bool? suppressDiagnostics)
209+
public async Task IExceptionHandlers_SuppressDiagnostics_TestLogs(bool? suppressDiagnostics)
210210
{
211211
// Arrange
212212
var sink = new TestSink();

0 commit comments

Comments
 (0)