Refactor code structure and optimize performance across multiple modules
This commit is contained in:
@@ -11,7 +11,8 @@ public sealed class PolicyEndpointsTests
|
||||
{
|
||||
private static readonly JsonSerializerOptions SerializerOptions = new(JsonSerializerDefaults.Web);
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task PolicySchemaReturnsEmbeddedSchema()
|
||||
{
|
||||
using var factory = new ScannerApplicationFactory();
|
||||
@@ -26,7 +27,8 @@ public sealed class PolicyEndpointsTests
|
||||
Assert.Contains("\"properties\"", payload);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task PolicyDiagnosticsReturnsRecommendations()
|
||||
{
|
||||
using var factory = new ScannerApplicationFactory();
|
||||
@@ -53,12 +55,14 @@ public sealed class PolicyEndpointsTests
|
||||
Assert.NotEmpty(diagnostics.Recommendations);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task PolicyPreviewUsesProposedPolicy()
|
||||
{
|
||||
using var factory = new ScannerApplicationFactory();
|
||||
using var client = factory.CreateClient();
|
||||
|
||||
using StellaOps.TestKit;
|
||||
const string policyYaml = """
|
||||
version: "1.0"
|
||||
rules:
|
||||
|
||||
Reference in New Issue
Block a user