// Copyright 2020-2025 The NATS Authors // Licensed under the Apache License, Version 2.0 using NATS.Client.Core; namespace ZB.MOM.NatsNet.Server.IntegrationTests.Helpers; /// /// Helpers for connecting NATS test clients to running servers. /// public static class NatsTestClient { /// Connects to the given NATS URL. public static async Task Connect(string url) { var conn = new NatsConnection(new NatsOpts { Url = url }); await conn.ConnectAsync(); return conn; } /// Connects to the client URL of the supplied server handle. public static Task ConnectToServer(object server) => throw new NotImplementedException("Requires a running server instance."); }