Refactor code structure and optimize performance across multiple modules
This commit is contained in:
@@ -19,6 +19,7 @@ using StellaOps.Scanner.WebService.Contracts;
|
||||
using StellaOps.Scanner.WebService.Options;
|
||||
using StellaOps.Scanner.WebService.Services;
|
||||
|
||||
using StellaOps.TestKit;
|
||||
namespace StellaOps.Scanner.WebService.Tests;
|
||||
|
||||
public sealed class ReportEventDispatcherTests
|
||||
@@ -28,7 +29,8 @@ public sealed class ReportEventDispatcherTests
|
||||
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
|
||||
};
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task PublishAsync_EmitsReportReadyAndScanCompleted()
|
||||
{
|
||||
var publisher = new RecordingEventPublisher();
|
||||
@@ -168,7 +170,8 @@ public sealed class ReportEventDispatcherTests
|
||||
Assert.Equal("blocked", scanPayload.Report.Verdict);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task PublishAsync_RecordsFnDriftClassificationChanges()
|
||||
{
|
||||
var publisher = new RecordingEventPublisher();
|
||||
@@ -249,7 +252,8 @@ public sealed class ReportEventDispatcherTests
|
||||
Assert.NotEqual(Guid.Empty, change.ManifestId);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task PublishAsync_DoesNotFailWhenFnDriftTrackingThrows()
|
||||
{
|
||||
var publisher = new RecordingEventPublisher();
|
||||
@@ -305,7 +309,8 @@ public sealed class ReportEventDispatcherTests
|
||||
Assert.Equal(2, publisher.Events.Count);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task PublishAsync_HonoursConfiguredConsoleAndApiSegments()
|
||||
{
|
||||
var options = Microsoft.Extensions.Options.Options.Create(new ScannerWebServiceOptions
|
||||
|
||||
Reference in New Issue
Block a user