Refactor code structure and optimize performance across multiple modules

This commit is contained in:
StellaOps Bot
2025-12-26 20:03:22 +02:00
parent c786faae84
commit b4fc66feb6
3353 changed files with 88254 additions and 1590657 deletions

View File

@@ -7,6 +7,7 @@
using System.Text.Json;
using Xunit;
using StellaOps.TestKit;
namespace StellaOps.Resolver.Tests;
public class FinalDigestTests
@@ -15,7 +16,8 @@ public class FinalDigestTests
private readonly IGraphOrderer _orderer = new TopologicalGraphOrderer();
private readonly ITrustLatticeEvaluator _evaluator = new DefaultTrustLatticeEvaluator();
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public void FinalDigest_IsDeterministic()
{
// DIGEST-9100-018: Same inputs → same digest
@@ -29,7 +31,8 @@ public class FinalDigestTests
Assert.Equal(result1.FinalDigest, result2.FinalDigest);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public void FinalDigest_ChangesWhenVerdictChanges()
{
// DIGEST-9100-019: FinalDigest changes when any verdict changes
@@ -53,7 +56,8 @@ public class FinalDigestTests
Assert.Equal(64, result1.FinalDigest.Length);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public void FinalDigest_ChangesWhenGraphChanges()
{
// DIGEST-9100-020: FinalDigest changes when graph changes
@@ -76,7 +80,8 @@ public class FinalDigestTests
Assert.NotEqual(result1.FinalDigest, result2.FinalDigest);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public void FinalDigest_ChangesWhenPolicyChanges()
{
// DIGEST-9100-021: FinalDigest changes when policy changes
@@ -97,7 +102,8 @@ public class FinalDigestTests
Assert.NotEqual(result1.FinalDigest, result2.FinalDigest);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public void VerificationApi_CorrectlyIdentifiesMatch()
{
// DIGEST-9100-022: Verification API works
@@ -116,7 +122,8 @@ public class FinalDigestTests
Assert.Empty(verification.Differences);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public void VerificationApi_CorrectlyIdentifiesMismatch()
{
// DIGEST-9100-022 continued: Verification API detects mismatch
@@ -137,7 +144,8 @@ public class FinalDigestTests
Assert.NotEmpty(verification.Differences);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public void FinalDigest_IsCollisionResistant()
{
// DIGEST-9100-024: Property test - different inputs → different digest