예제 #1
0
        public void ExecuteInteractiveDiagnosticsButNoTestsEnabled()
        {
            // arrange
            InteractiveDiagnosticAction action = Helper.GetInteractiveDiagnosticAction(DeviceType.MX4);

            InitializeForTest(action);

            InteractiveDiagnosticOperation interactiveDiagOperation = new InteractiveDiagnosticOperation(action);
            InteractiveDiagnosticEvent     diag = (InteractiveDiagnosticEvent)interactiveDiagOperation.Execute();

            Assert.DoesNotContain("Controller.Key", diag.Details);
        }
예제 #2
0
        // This test is for testing the instrument's battery charging, so dock expects instrument to be present
        public void ExecuteInteractiveDiagnosticsForBatteryChargingWhenInstrumentNotDocked()
        {
            // arrange
            InteractiveDiagnosticAction action = Helper.GetInteractiveDiagnosticAction(DeviceType.MX4);

            action.DiagnoseBatteryCharging = true;
            InitializeForTest(action);

            InteractiveDiagnosticOperation interactiveDiagOperation = new InteractiveDiagnosticOperation(action);

            InteractiveDiagnosticEvent diag = (InteractiveDiagnosticEvent)interactiveDiagOperation.Execute();

            Assert.Contains("Instrument present:                  FAILED", diag.Details);
        }
예제 #3
0
        public void ExecuteInteractiveDiagnosticsForBatteryChargingForNonRechargableBatteries()
        {
            // arrange
            InteractiveDiagnosticAction action = Helper.GetInteractiveDiagnosticAction(DeviceType.TX1);

            action.DiagnoseBatteryCharging = true;
            InitializeForTest(action);

            InteractiveDiagnosticOperation interactiveDiagOperation = new InteractiveDiagnosticOperation(action);

            InteractiveDiagnosticEvent diag = (InteractiveDiagnosticEvent)interactiveDiagOperation.Execute();

            Assert.DoesNotContain("Controller.Key", diag.Details);
        }
예제 #4
0
        // For docking stations with no lid switches, there's no need to perform the test.
        public void ExecuteInteractiveDiagnosticsForTestLidSwitches()
        {
            // arrange
            InteractiveDiagnosticAction action = Helper.GetInteractiveDiagnosticAction(DeviceType.MX6);

            action.DiagnoseLidSwitches = true;
            InitializeForTest(action);

            InteractiveDiagnosticOperation interactiveDiagOperation = new InteractiveDiagnosticOperation(action);

            InteractiveDiagnosticEvent diag = (InteractiveDiagnosticEvent)interactiveDiagOperation.Execute();

            Assert.Contains("Pump adapter present:", diag.Details);
        }
예제 #5
0
        public void ExecuteInteractiveDiagnosticsForTestInstrumentCommunicationWithoutInstrument()
        {
            // arrange
            InteractiveDiagnosticAction action = Helper.GetInteractiveDiagnosticAction(DeviceType.MX4);

            action.DiagnoseInstrumentCommunication = true;
            InitializeForTest(action);

            InteractiveDiagnosticOperation interactiveDiagOperation = new InteractiveDiagnosticOperation(action);

            InteractiveDiagnosticEvent diag = (InteractiveDiagnosticEvent)interactiveDiagOperation.Execute();

            Assert.Contains("Instrument present:                  FAILED", diag.Details);
        }
예제 #6
0
        // For docking stations with no lid switches, there's no need to perform the test.
        public void ExecuteInteractiveDiagnosticsForTestiGas()
        {
            // arrange
            InteractiveDiagnosticAction action = Helper.GetInteractiveDiagnosticAction(DeviceType.MX6);

            action.DiagnoseIGas = true;
            InitializeForTest(action);

            InteractiveDiagnosticOperation interactiveDiagOperation = new InteractiveDiagnosticOperation(action);

            InteractiveDiagnosticEvent diag = (InteractiveDiagnosticEvent)interactiveDiagOperation.Execute();

            Assert.Contains("Pressure switch #3 pressure:         PASSED", diag.Details);
        }
예제 #7
0
        // For docking stations with no lid switches, there's no need to perform the test.
        public void SkipInteractiveDiagnosticsForTestLidSwitchesForDiffusionOnlyDocks()
        {
            // arrange
            InteractiveDiagnosticAction action = Helper.GetInteractiveDiagnosticAction(DeviceType.GBPRO);

            action.DiagnoseLidSwitches = true;
            InitializeForTest(action);

            InteractiveDiagnosticOperation interactiveDiagOperation = new InteractiveDiagnosticOperation(action);

            InteractiveDiagnosticEvent diag = (InteractiveDiagnosticEvent)interactiveDiagOperation.Execute();

            Assert.DoesNotContain("Pump adapter present:", diag.Details);
        }
예제 #8
0
        public void ExecuteInteractiveDiagnosticsForTestBuzzer()
        {
            // arrange
            InteractiveDiagnosticAction action = Helper.GetInteractiveDiagnosticAction(DeviceType.MX6);

            action.DiagnoseBuzzer = true;
            InitializeForTest(action);

            InteractiveDiagnosticOperation interactiveDiagOperation = new InteractiveDiagnosticOperation(action);

            InteractiveDiagnosticEvent diag = (InteractiveDiagnosticEvent)interactiveDiagOperation.Execute();

            Assert.Contains("Buzzer works correctly:              PASSED", diag.Details);
        }
예제 #9
0
        public void ExecuteInteractiveDiagnosticsForTestCradleGasFlowForSC()
        {
            // arrange
            InteractiveDiagnosticAction action = Helper.GetInteractiveDiagnosticAction(DeviceType.SC);

            action.DiagnoseCradleGasFlow = true;
            InitializeForTest(action);

            InteractiveDiagnosticOperation interactiveDiagOperation = new InteractiveDiagnosticOperation(action);

            InteractiveDiagnosticEvent diag = (InteractiveDiagnosticEvent)interactiveDiagOperation.Execute();

            Assert.Contains("Cradle flow through hose:            PASSED", diag.Details);
            Assert.DoesNotContain("Cradle routes flow to lid:", diag.Details);
        }
예제 #10
0
        // For new Ventis Cradle docking station, there's no need to perform the test.
        public void SkipInteractiveDiagnosticsForTestLidSwitchesForNewVentisCradle()
        {
            // arrange
            InteractiveDiagnosticAction action = Helper.GetInteractiveDiagnosticAction(DeviceType.MX4);

            action.DiagnoseLidSwitches = true;
            InitializeForTest(action);

            Configuration.DockingStation.HasNewVentisCradle = true;

            InteractiveDiagnosticOperation interactiveDiagOperation = new InteractiveDiagnosticOperation(action);

            InteractiveDiagnosticEvent diag = (InteractiveDiagnosticEvent)interactiveDiagOperation.Execute();

            Assert.DoesNotContain("Pump adapter present:", diag.Details);
        }
예제 #11
0
        // This test is for testing the instrument's battery charging, so dock expects instrument to be present
        // This calls discoverdocked instrument and thereby throws exception, however is exception is NOT thrown
        public void ExecuteInteractiveDiagnosticsForBatteryChargingWhenInstrumentIsDockedAndFetchInstrumentBatteryDetails() // TODO
        {
            // arrange
            InteractiveDiagnosticAction action = Helper.GetInteractiveDiagnosticAction(DeviceType.MX4);

            action.DiagnoseBatteryCharging = true;
            InitializeForTest(action);

            controllerWrapper.Setup(x => x.IsDocked()).Returns(true);

            InteractiveDiagnosticOperation interactiveDiagOperation = new InteractiveDiagnosticOperation(action);

            InteractiveDiagnosticEvent diag = (InteractiveDiagnosticEvent)interactiveDiagOperation.Execute();

            Assert.Contains("Battery installed:                   PASSED", diag.Details);
        }
예제 #12
0
        public void SkipInteractiveDiagnosticsForTestCradleGasFlowForVentisLS()
        {
            // arrange
            InteractiveDiagnosticAction action = Helper.GetInteractiveDiagnosticAction(DeviceType.MX4);

            action.DiagnoseCradleGasFlow = true;
            InitializeForTest(action);

            Configuration.DockingStation.PartNumber = Configuration.VENTISLS_PARTNUMBER;

            InteractiveDiagnosticOperation interactiveDiagOperation = new InteractiveDiagnosticOperation(action);

            InteractiveDiagnosticEvent diag = (InteractiveDiagnosticEvent)interactiveDiagOperation.Execute();

            Assert.DoesNotContain("Cradle routes flow to lid:", diag.Details);
            Assert.DoesNotContain("Cradle routes flow to hose:", diag.Details);
        }
예제 #13
0
        // For docking stations with no lid switches, there's no need to perform the test.
        public void ExecuteInteractiveDiagnosticsForTestLidSwitchesOnlyForDiffusionLidForVentisLS()
        {
            // arrange
            InteractiveDiagnosticAction action = Helper.GetInteractiveDiagnosticAction(DeviceType.MX4);

            action.DiagnoseLidSwitches = true;
            InitializeForTest(action);

            Configuration.DockingStation.PartNumber = Configuration.VENTISLS_PARTNUMBER;

            InteractiveDiagnosticOperation interactiveDiagOperation = new InteractiveDiagnosticOperation(action);

            InteractiveDiagnosticEvent diag = (InteractiveDiagnosticEvent)interactiveDiagOperation.Execute();

            Assert.DoesNotContain("Pump adapter present:", diag.Details);
            Assert.Contains("Diffusion lid raised:                PASSED", diag.Details);
        }
예제 #14
0
        public void ExecuteInteractiveDiagnosticsForTestFlowRateForDSX()
        {
            // arrange
            InteractiveDiagnosticAction action = Helper.GetInteractiveDiagnosticAction(DeviceType.MX4);

            action.DiagnoseFlowRate = true;
            InitializeForTest(action);

            controllerWrapper.SetupSequence(x => x.GetKeyPress())
            .Returns(new KeyPress(Key.Left, new TimeSpan(0, 0, 5)))
            .Returns(new KeyPress(Key.Right, new TimeSpan(0, 0, 5)))
            .Returns(new KeyPress(Key.Middle, new TimeSpan(0, 0, 5)));

            InteractiveDiagnosticOperation interactiveDiagOperation = new InteractiveDiagnosticOperation(action);

            InteractiveDiagnosticEvent diag = (InteractiveDiagnosticEvent)interactiveDiagOperation.Execute();

            Assert.Contains("Flow Offset:                         PASSED", diag.Details);
        }