23 lines
646 B
C#
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*");
|
|
}
|
|
}
|