Skip to content

Commit

Permalink
SonarLint fixes in test
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasArdal committed May 28, 2024
1 parent b3b0a68 commit 7fd3fae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<LangVersion>12.0</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ public async Task MiddlewareCanDecorateLogContext()
httpContext.Request.Path = new PathString("/test");
httpContext.Request.Method = "GET";
httpContext.Response.StatusCode = 404;
httpContext.User = new ClaimsPrincipal(new ClaimsIdentity(new Claim[]
{
new Claim(ClaimTypes.Name, "User")
}));
httpContext.User = new ClaimsPrincipal(new ClaimsIdentity([new(ClaimTypes.Name, "User")]));
httpContext.Request.Headers.Add("RequestKey", new StringValues("RequestValue"));

// Act
Expand Down

0 comments on commit 7fd3fae

Please sign in to comment.