using NATS.Server.Configuration;

namespace NATS.Server.Tests;

public class ClusterJetStreamConfigProcessorTests
{
    [Fact]
    public void ConfigProcessor_maps_jetstream_and_cluster_blocks()
    {
        var cfg = """
        cluster { name: C1; listen: 127.0.0.1:6222 }
        jetstream { store_dir: /tmp/js; max_mem_store: 1GB; max_file_store: 10GB }
        """;

        var opts = ConfigProcessor.ProcessConfig(cfg);

        opts.Cluster.ShouldNotBeNull();
        opts.JetStream.ShouldNotBeNull();
        opts.JetStream!.StoreDir.ShouldBe("/tmp/js");
    }
}
