Beispiel #1
0
        public void ExecuteGeneralDiag()
        {
            // arrange
            InstrumentDiagnosticAction action = Helper.GetDiagnosticAction(DeviceType.MX4);

            InitializeForTest(action);

            InstrumentDiagnosticOperation diagOperation = new InstrumentDiagnosticOperation(action);
            InstrumentDiagnosticEvent     diag          = (InstrumentDiagnosticEvent)diagOperation.Execute();

            Assert.True(diag.Diagnostics.Count == 2);

            instrumentController.Verify(x => x.ClearInstrumentErrors(), Times.Once);
        }
Beispiel #2
0
        public void ExecuteDiagnosticsForMX6InstrumentErrorsOnCustomerAccount()
        {
            // arrange
            InstrumentDiagnosticAction action = Helper.GetDiagnosticAction(DeviceType.MX6);

            InitializeForTest(action);

            InstrumentDiagnosticOperation diagOperation = new InstrumentDiagnosticOperation(action);

            diagOperation.criticalErrorsList = DiagErrorDataAccess.Object.FindAll();

            InstrumentDiagnosticEvent diag = (InstrumentDiagnosticEvent)diagOperation.Execute();

            Assert.True(diag.Diagnostics.Count == 2 && diag.InstrumentInCriticalError &&
                        diag.InstrumentCriticalErrorCode == diagOperation.criticalErrorsList[0].Code.ToString());

            instrumentController.Verify(x => x.ClearInstrumentErrors(), Times.Never);
        }