using FluentAssertions;
using Xunit;
using ZB.MOM.WW.LmxProxy.Client.Domain;

namespace ZB.MOM.WW.LmxProxy.Client.Tests.Domain;

public class VtqTests
{
    [Fact]
    public void Good_FactoryMethod()
    {
        var vtq = Vtq.Good(42.0);
        vtq.Value.Should().Be(42.0);
        vtq.Quality.Should().Be(Quality.Good);
        vtq.Timestamp.Kind.Should().Be(DateTimeKind.Utc);
    }

    [Fact]
    public void Bad_FactoryMethod()
    {
        var vtq = Vtq.Bad();
        vtq.Value.Should().BeNull();
        vtq.Quality.Should().Be(Quality.Bad);
    }

    [Fact]
    public void Uncertain_FactoryMethod()
    {
        var vtq = Vtq.Uncertain("stale");
        vtq.Value.Should().Be("stale");
        vtq.Quality.Should().Be(Quality.Uncertain);
    }
}
