Refactor code structure and optimize performance across multiple modules
This commit is contained in:
@@ -10,6 +10,8 @@ using StellaOps.Scanner.Storage.Postgres;
|
||||
using StellaOps.Scanner.Storage.Repositories;
|
||||
using Xunit;
|
||||
|
||||
|
||||
using StellaOps.TestKit;
|
||||
namespace StellaOps.Scanner.ProofSpine.Tests;
|
||||
|
||||
[Collection("scanner-proofspine-postgres")]
|
||||
@@ -20,7 +22,8 @@ public sealed class PostgresProofSpineRepositoryTests
|
||||
public PostgresProofSpineRepositoryTests(ScannerProofSpinePostgresFixture fixture)
|
||||
=> _fixture = fixture;
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task SaveAsync_ThenGetByIdAsync_RoundTripsSpine()
|
||||
{
|
||||
await _fixture.TruncateAllTablesAsync();
|
||||
|
||||
@@ -5,11 +5,13 @@ using StellaOps.Scanner.ProofSpine;
|
||||
using StellaOps.Scanner.ProofSpine.Options;
|
||||
using Xunit;
|
||||
|
||||
using StellaOps.TestKit;
|
||||
namespace StellaOps.Scanner.ProofSpine.Tests;
|
||||
|
||||
public sealed class ProofSpineBuilderTests
|
||||
{
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task BuildAsync_SameInputs_ProducesSameIds()
|
||||
{
|
||||
var options = Options.Create(new ProofSpineDsseSigningOptions
|
||||
@@ -62,7 +64,8 @@ public sealed class ProofSpineBuilderTests
|
||||
Assert.Equal(spine1.Segments[1].SegmentId, spine2.Segments[1].SegmentId);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task VerifyAsync_DetectsTampering()
|
||||
{
|
||||
var options = Options.Create(new ProofSpineDsseSigningOptions
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<ProjectReference Include="..\..\__Libraries\StellaOps.Scanner.ProofSpine\StellaOps.Scanner.ProofSpine.csproj" />
|
||||
<ProjectReference Include="..\..\__Libraries\StellaOps.Scanner.Storage\StellaOps.Scanner.Storage.csproj" />
|
||||
<ProjectReference Include="..\..\..\__Tests\__Libraries\StellaOps.Infrastructure.Postgres.Testing\StellaOps.Infrastructure.Postgres.Testing.csproj" />
|
||||
<ProjectReference Include="../../../__Libraries/StellaOps.TestKit/StellaOps.TestKit.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user