public void ConnectAsyncTest()
        {
            BusAttachment bus = new BusAttachment("connect", true, 4);

            bus.Start();

            for (int i = 0; i < 5; i++)
            {
                bus.ConnectAsync(connectSpec).AsTask().Wait();
                Assert.IsTrue(bus.IsConnected());
                bus.DisconnectAsync(connectSpec).AsTask().Wait();
                Assert.IsFalse(bus.IsConnected());
            }
        }
        public void ConnectAsyncTest()
        {
            BusAttachment bus = new BusAttachment("connect", true, 4);
            bus.Start();

            for (int i = 0; i < 5; i++)
            {
                bus.ConnectAsync(connectSpec).AsTask().Wait();
                Assert.IsTrue(bus.IsConnected());
                bus.DisconnectAsync(connectSpec).AsTask().Wait();
                Assert.IsFalse(bus.IsConnected());
            }
        }