Esempio n. 1
0
        public void ClearManualGasOperations()
        {
            // arrange
            InstrumentManualOperationsClearAction action = Helper.GetManualOperationsClearAction(DeviceType.MX4);

            InitializeForTest(action);

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

            InstrumentManualOperationsClearOperation manualOperationsClearOperation = new InstrumentManualOperationsClearOperation(action);
            InstrumentManualOperationsClearEvent     manualOperationsClearEvent     = (InstrumentManualOperationsClearEvent)manualOperationsClearOperation.Execute();

            instrumentController.Verify(x => x.ClearManualGasOperations(), Times.Once);
        }
        /// <summary>
        /// </summary>
        /// <returns>Docking station event</returns>
        public DockingStationEvent Execute()
        {
            Stopwatch stopwatch = Log.TimingBegin("MANUAL OPERATIONS CLEAR");

            InstrumentManualOperationsClearEvent clearEvent = new InstrumentManualOperationsClearEvent(this);

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

            using (InstrumentController instrumentController = Master.Instance.SwitchService.InstrumentController)
            {
                instrumentController.Initialize();

                instrumentController.ClearManualGasOperations();

                Log.Debug(Name + ": Manual gas operations cleared.");
            } // end-using

            Log.TimingEnd("MANUAL OPERATIONS CLEAR", stopwatch);

            return(clearEvent);
        }