using Shouldly;
using Xunit;
using ZB.MOM.WW.OtOpcUa.Commons.OpcUa;

namespace ZB.MOM.WW.OtOpcUa.Commons.Tests.OpcUa;

public class NullOpcUaNodeWriteGatewayTests
{
    [Fact]
    public async Task NullGateway_returns_writes_unavailable()
    {
        var outcome = await NullOpcUaNodeWriteGateway.Instance.WriteAsync("ns=2;s=x", 1, AddressSpaceRealm.Uns, TestContext.Current.CancellationToken);
        outcome.Success.ShouldBeFalse();
        outcome.Reason.ShouldBe("writes unavailable");
    }
}
