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
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ public async Task TryHandleAsync_ProblemDetailsServiceDeclinesToWrite_WritesTheP

// Assert
context.Response.Body.Seek(0, SeekOrigin.Begin);
string body = await new StreamReader(context.Response.Body, Encoding.UTF8).ReadToEndAsync();
using StreamReader reader = new(context.Response.Body, Encoding.UTF8);
string body = await reader.ReadToEndAsync();

using JsonDocument document = JsonDocument.Parse(body);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,10 @@ public void Analyze_CheckoutThatIsReported_IsNotAlsoAcknowledged()
public static TheoryData<string> RulesThatAcknowledgeNothing()
{
TheoryData<string> data = [];
foreach (IWorkflowSecurityRule rule in RuleCatalogue.All())
foreach (IWorkflowSecurityRule rule in RuleCatalogue.All()
.Where(rule => rule is not (ExcessivePermissionsRule or PersistedCredentialsRule)))
{
if (rule is not (ExcessivePermissionsRule or PersistedCredentialsRule))
{
data.Add(rule.RuleId);
}
data.Add(rule.RuleId);
}

return data;
Expand Down