Refactor code structure and optimize performance across multiple modules
This commit is contained in:
@@ -4,6 +4,7 @@ using FluentAssertions;
|
||||
using Microsoft.AspNetCore.Mvc.Testing;
|
||||
using StellaOps.SbomService.Models;
|
||||
|
||||
using StellaOps.TestKit;
|
||||
namespace StellaOps.SbomService.Tests;
|
||||
|
||||
public class EntrypointEndpointsTests : IClassFixture<WebApplicationFactory<Program>>
|
||||
@@ -15,7 +16,8 @@ public class EntrypointEndpointsTests : IClassFixture<WebApplicationFactory<Prog
|
||||
_factory = factory;
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task Get_entrypoints_requires_tenant()
|
||||
{
|
||||
var client = _factory.CreateClient();
|
||||
@@ -24,7 +26,8 @@ public class EntrypointEndpointsTests : IClassFixture<WebApplicationFactory<Prog
|
||||
response.StatusCode.Should().Be(HttpStatusCode.BadRequest);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task Get_entrypoints_returns_seeded_list()
|
||||
{
|
||||
var client = _factory.CreateClient();
|
||||
@@ -39,7 +42,8 @@ public class EntrypointEndpointsTests : IClassFixture<WebApplicationFactory<Prog
|
||||
payload.Items.Select(e => e.Artifact).Should().Contain("ghcr.io/stellaops/sample-api");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task Post_entrypoints_upserts_and_returns_ordered_list()
|
||||
{
|
||||
var client = _factory.CreateClient();
|
||||
|
||||
Reference in New Issue
Block a user