using StellaOps.AirGap.Time.Models; namespace StellaOps.AirGap.Time.Tests; public class TimeStatusDtoTests { [Fact] public void SerializesDeterministically() { var status = new TimeStatus( new TimeAnchor(DateTimeOffset.Parse("2025-01-01T00:00:00Z"), "source", "fmt", "fp", "digest"), new StalenessEvaluation(42, 10, 20, true, false), new StalenessBudget(10, 20), new Dictionary { { "advisories", new StalenessEvaluation(42, 10, 20, true, false) } }, DateTimeOffset.Parse("2025-01-02T00:00:00Z")); var json = TimeStatusDto.FromStatus(status).ToJson(); Assert.Contains("\"contentStaleness\":{\"advisories\":{", json); Assert.Contains("\"ageSeconds\":42", json); } }