public void ConfiguredVirtualDevice_SwitchToAnotherVirtualDevice_CanConnect()
        {
            ISwitchExecutiveDriverOperations driverOperations = new NISwitchExecutiveDriverOperations();

            driverOperations.SelectedVirtualDevice = "SwitchExecutiveExample";
            driverOperations.TryDisconnectAll();
            driverOperations.SelectedRoute = "PowerUUT";
            driverOperations.TryConnect(MulticonnectMode.Multiconnect);
            driverOperations.TryDisconnectAll();

            driverOperations.SelectedVirtualDevice = "VirtualDevice1";
            driverOperations.SelectedRoute         = "RouteGroup0";
            driverOperations.TryConnect(MulticonnectMode.Multiconnect);
            Assert.IsTrue(driverOperations.IsConnected());
        }
        public void ConnectNoMulticonnectTwiceErrorsTest()
        {
            ISwitchExecutiveDriverOperations driverOperations = new NISwitchExecutiveDriverOperations();

            driverOperations.SelectedVirtualDevice = "SwitchExecutiveExample";
            driverOperations.TryDisconnectAll();
            driverOperations.SelectedRoute = "PowerUUT";
            driverOperations.TryConnect(MulticonnectMode.NoMulticonnect);

            Assert.ThrowsException <DriverException>(() => { driverOperations.TryConnect(MulticonnectMode.NoMulticonnect); });
        }
        public void ConnectDisconnectAllRouteTest()
        {
            ISwitchExecutiveDriverOperations driverOperations = new NISwitchExecutiveDriverOperations();
            string newVirtualDevice = "SwitchExecutiveExample";

            driverOperations.SelectedVirtualDevice = newVirtualDevice;
            driverOperations.TryDisconnectAll();
            string newRoute = "PowerUUT";

            driverOperations.SelectedRoute = newRoute;

            Assert.IsTrue(driverOperations.CanConnect());
            Assert.IsFalse(driverOperations.IsConnected());
            driverOperations.TryConnect(MulticonnectMode.Multiconnect);
            Assert.IsTrue(driverOperations.IsConnected());
            Assert.IsTrue(driverOperations.ConnectedRoutes.Any());

            Assert.IsTrue(driverOperations.CanDisconnect());
            driverOperations.TryDisconnectAll();
            Assert.IsFalse(driverOperations.IsConnected());
            Assert.IsFalse(driverOperations.ConnectedRoutes.Any());
        }