Files
git.stella-ops.org/src/__Libraries/__Tests/StellaOps.Testing.Determinism.Tests/DeterminismManifestTests.SchemaValidation.cs

23 lines
646 B
C#

using System;
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 ToCanonicalBytes_WithInvalidSchemaVersion_ThrowsInvalidOperationException()
{
var manifest = CreateSampleManifest() with { SchemaVersion = "2.0" };
Action act = () => DeterminismManifestWriter.ToCanonicalBytes(manifest);
act.Should().Throw<InvalidOperationException>()
.WithMessage("*schema version*2.0*");
}
}