Neon.Xunit.NatsStreamingFixture.Connect()

Here are the examples of the csharp api Neon.Xunit.NatsStreamingFixture.Connect() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

19 Source : NatsStreamingFixture.cs
with Apache License 2.0
from nforgeio

public void StartAsComposed(
            string   image = null,
            string   name  = "nats-streaming-test",
            string[] args  = null)
        {
            this.containerName = name;

            image = image ?? $"{NeonHelper.NeonLibraryBranchRegistry}/nats-streaming:latest";

            base.CheckWithinAction();

            var dockerArgs =
                new string[]
                {
                    "--detach",
                    "-p", "4222:4222",
                    "-p", "8222:8222",
                };

            var containerArgs = new List<string>();

            if (args != null)
            {
                foreach (var arg in args)
                {
                    containerArgs.Add(arg);
                }
            }

            if (!IsRunning)
            {
                StartAsComposed(name, image, dockerArgs, containerArgs);
            }

            Connect();
        }

19 Source : NatsStreamingFixture.cs
with Apache License 2.0
from nforgeio

public new IStanConnection Restart()
        {
            base.Restart();

            if (Connection != null)
            {
                Connection.Dispose();
                Connection = null;
            }

            Connect();

            return Connection;
        }