Refactor code structure and optimize performance across multiple modules
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
using System.Text.Json;
|
||||
using Xunit;
|
||||
|
||||
using StellaOps.TestKit;
|
||||
namespace StellaOps.Resolver.Tests;
|
||||
|
||||
public class DeterministicResolverTests
|
||||
@@ -15,7 +16,8 @@ public class DeterministicResolverTests
|
||||
private readonly IGraphOrderer _orderer = new TopologicalGraphOrderer();
|
||||
private readonly ITrustLatticeEvaluator _evaluator = new DefaultTrustLatticeEvaluator();
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public void Run_SameInputTwice_IdenticalFinalDigest()
|
||||
{
|
||||
// RESOLVER-9100-020: Replay test
|
||||
@@ -31,7 +33,8 @@ public class DeterministicResolverTests
|
||||
Assert.Equal(result1.TraversalSequence.Length, result2.TraversalSequence.Length);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public void Run_ShuffledNodesAndEdges_IdenticalFinalDigest()
|
||||
{
|
||||
// RESOLVER-9100-021: Permutation test
|
||||
@@ -60,7 +63,8 @@ public class DeterministicResolverTests
|
||||
Assert.Equal(result1.FinalDigest, result2.FinalDigest);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public void Run_IsIdempotent()
|
||||
{
|
||||
// RESOLVER-9100-022: Idempotency property test
|
||||
@@ -76,7 +80,8 @@ public class DeterministicResolverTests
|
||||
Assert.Equal(result2.FinalDigest, result3.FinalDigest);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public void Run_TraversalSequence_MatchesTopologicalOrder()
|
||||
{
|
||||
// RESOLVER-9100-023: Traversal order test
|
||||
@@ -106,7 +111,8 @@ public class DeterministicResolverTests
|
||||
"Root should appear before at least one child in traversal");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public void ResolutionResult_CanonicalJsonStructure()
|
||||
{
|
||||
// RESOLVER-9100-024: Snapshot test for canonical JSON
|
||||
|
||||
Reference in New Issue
Block a user