Refactor code structure and optimize performance across multiple modules
This commit is contained in:
@@ -17,7 +17,8 @@ public sealed class SbomLedgerEndpointsTests : IClassFixture<WebApplicationFacto
|
||||
_factory = factory.WithWebHostBuilder(_ => { });
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task Upload_accepts_cyclonedx_and_returns_analysis_job()
|
||||
{
|
||||
var client = _factory.CreateClient();
|
||||
@@ -34,7 +35,8 @@ public sealed class SbomLedgerEndpointsTests : IClassFixture<WebApplicationFacto
|
||||
payload.AnalysisJobId.Should().NotBeNullOrWhiteSpace();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task Upload_accepts_spdx_and_records_history()
|
||||
{
|
||||
var client = _factory.CreateClient();
|
||||
@@ -65,7 +67,8 @@ public sealed class SbomLedgerEndpointsTests : IClassFixture<WebApplicationFacto
|
||||
diffPayload!.Summary.VersionChangedCount.Should().Be(1);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task Lineage_includes_build_edges_for_shared_build_id()
|
||||
{
|
||||
var client = _factory.CreateClient();
|
||||
@@ -88,6 +91,7 @@ public sealed class SbomLedgerEndpointsTests : IClassFixture<WebApplicationFacto
|
||||
private static SbomUploadRequest CreateUploadRequest(string artifactRef, string sbomJson)
|
||||
{
|
||||
using var document = JsonDocument.Parse(sbomJson);
|
||||
using StellaOps.TestKit;
|
||||
return new SbomUploadRequest
|
||||
{
|
||||
ArtifactRef = artifactRef,
|
||||
|
||||
Reference in New Issue
Block a user