using Shouldly;

namespace NATS.Server.Tests.WebSocket;

public class WebSocketOptionsTests
{
    [Fact]
    public void DefaultOptions_PortIsNegativeOne_Disabled()
    {
        var opts = new WebSocketOptions();
        opts.Port.ShouldBe(-1);
        opts.Host.ShouldBe("0.0.0.0");
        opts.Compression.ShouldBeFalse();
        opts.NoTls.ShouldBeFalse();
        opts.HandshakeTimeout.ShouldBe(TimeSpan.FromSeconds(2));
        opts.AuthTimeout.ShouldBe(TimeSpan.FromSeconds(2));
    }

    [Fact]
    public void NatsOptions_HasWebSocketProperty()
    {
        var opts = new NatsOptions();
        opts.WebSocket.ShouldNotBeNull();
        opts.WebSocket.Port.ShouldBe(-1);
    }
}
