public void ClearAlarmEvents()
        {
            // arrange
            InstrumentDatalogClearAction action = Helper.GetDatalogClearAction(DeviceType.MX4);

            InitializeForTest(action);

            instrumentController.Setup(x => x.ClearDatalog());

            InstrumentDatalogClearOperation datalogClearOperation = new InstrumentDatalogClearOperation(action);
            InstrumentDatalogClearEvent     datalogClearEvent     = (InstrumentDatalogClearEvent)datalogClearOperation.Execute();

            instrumentController.Verify(x => x.ClearDatalog(), Times.Once);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// </summary>
        /// <returns>Docking station event</returns>
        public DockingStationEvent Execute()
        {
            Stopwatch stopwatch = Log.TimingBegin("DATALOG CLEAR");

            InstrumentDatalogClearEvent datalogClearEvent = new InstrumentDatalogClearEvent(this);

            datalogClearEvent.DockedInstrument = (ISC.iNet.DS.DomainModel.Instrument)Master.Instance.SwitchService.Instrument.Clone();
            datalogClearEvent.DockingStation   = Master.Instance.ControllerWrapper.GetDockingStation();

            using (InstrumentController instrumentController = Master.Instance.SwitchService.InstrumentController)
            {
                instrumentController.Initialize();
                datalogClearEvent.SessionsCleared = 0;
                datalogClearEvent.SessionsCleared = instrumentController.ClearDatalog();
            } // end-using

            Log.TimingEnd("DATALOG CLEAR", stopwatch);

            return(datalogClearEvent);
        }