23 lines
714 B
C#
23 lines
714 B
C#
using FluentAssertions;
|
|
using StellaOps.TestKit;
|
|
using StellaOps.Testing.Determinism;
|
|
using Xunit;
|
|
|
|
namespace StellaOps.Testing.Determinism.Tests;
|
|
|
|
public sealed partial class DeterminismManifestTests
|
|
{
|
|
[Trait("Category", TestCategories.Unit)]
|
|
[Fact]
|
|
public void ComputeCanonicalHash_ProducesDeterministicHash()
|
|
{
|
|
var manifest = CreateSampleManifest();
|
|
|
|
var hash1 = DeterminismManifestWriter.ComputeCanonicalHash(manifest);
|
|
var hash2 = DeterminismManifestWriter.ComputeCanonicalHash(manifest);
|
|
|
|
hash1.Should().Be(hash2, "Same manifest should produce same hash");
|
|
hash1.Should().MatchRegex("^[0-9a-f]{64}$", "Hash should be 64-character hex string");
|
|
}
|
|
}
|