public void DownloadManualOperationsWithoutData()
        {
            // arrange
            InstrumentManualOperationsDownloadAction action = Helper.GetManualOperationsDownloadAction(DeviceType.MX4);

            InitializeForTest(action);

            InstrumentManualOperationsDownloadOperation manualOpDownloadOperation = new InstrumentManualOperationsDownloadOperation(action);
            InstrumentManualOperationsDownloadEvent     manualOpDownloadEvent     = (InstrumentManualOperationsDownloadEvent)manualOpDownloadOperation.Execute();

            Assert.True(manualOpDownloadEvent.GasResponses.Count == 0);
        }
        public void ThrowArgumentOutOfRangeException()
        {
            // arrange
            InstrumentManualOperationsDownloadAction action = Helper.GetManualOperationsDownloadAction(DeviceType.MX6);

            InitializeForTest(action);

            DateTime sessionTime = DateTime.Now;

            instrumentController.Setup(x => x.GetManualGasOperations())
            .Throws(new ArgumentOutOfRangeException());

            InstrumentManualOperationsDownloadOperation manualOpDownloadOperation = new InstrumentManualOperationsDownloadOperation(action);
            InstrumentManualOperationsDownloadEvent     manualOpDownloadEvent     = (InstrumentManualOperationsDownloadEvent)manualOpDownloadOperation.Execute();

            Assert.True(manualOpDownloadEvent.Errors.Count > 0);
        }
        public void DownloadManualOperationsData()
        {
            // arrange
            InstrumentManualOperationsDownloadAction action = Helper.GetManualOperationsDownloadAction(DeviceType.MX6);

            InitializeForTest(action);

            DateTime cylExpirationDate = DateTime.Now.AddMonths(8);

            instrumentController.Setup(x => x.GetManualGasOperations())
            .Returns(new SensorGasResponse[] { new SensorGasResponse() });

            InstrumentManualOperationsDownloadOperation manualOpDownloadOperation = new InstrumentManualOperationsDownloadOperation(action);
            InstrumentManualOperationsDownloadEvent     manualOpDownloadEvent     = (InstrumentManualOperationsDownloadEvent)manualOpDownloadOperation.Execute();

            Assert.True(manualOpDownloadEvent.GasResponses.Count == 1);
        }
Exemplo n.º 4
0
        public void GetBadPumpTubingDetectedActionForCalibration()
        {
            // arrange
            InstrumentManualOperationsDownloadAction    action    = new InstrumentManualOperationsDownloadAction();
            InstrumentManualOperationsDownloadOperation operation = new InstrumentManualOperationsDownloadOperation(action);

            dsEvent    = new InstrumentManualOperationsDownloadEvent(operation);
            instrument = Helper.GetInstrumentForTest(DeviceType.VPRO, DeviceSubType.VentisPro4);
            Initialize();

            switchService.Setup(x => x.BadPumpTubingDetectedDuringCal).Returns(true);

            CreateMasterForTest();
            // act
            nextAction = scheduler.GetNextAction(dsEvent);

            // assert
            Xunit.Assert.True(nextAction is BadPumpTubingDetectedAction);
        }
Exemplo n.º 5
0
        public void GetInstrumentManualOperationsClearActionAsFollowUpActionForInstrumentManualOperationsDownloadToClearErrors()
        {
            // arrange
            InstrumentManualOperationsDownloadAction    action    = new InstrumentManualOperationsDownloadAction();
            InstrumentManualOperationsDownloadOperation operation = new InstrumentManualOperationsDownloadOperation(action);
            InstrumentManualOperationsDownloadEvent     dsEvent   = new InstrumentManualOperationsDownloadEvent(operation);

            dsEvent.Errors.Add(new DockingStationError("Test Error!"));

            Initialize();

            CreateMasterForTest();

            // act
            nextAction = scheduler.GetNextAction(dsEvent);

            // assert
            Xunit.Assert.True(nextAction is InstrumentManualOperationsClearAction);
        }
Exemplo n.º 6
0
        public void GetInstrumentManualOperationsClearActionAsFollowUpActionForInstrumentManualOperationsDownloadToClearGasReponses()
        {
            // arrange
            InstrumentManualOperationsDownloadAction    action    = new InstrumentManualOperationsDownloadAction();
            InstrumentManualOperationsDownloadOperation operation = new InstrumentManualOperationsDownloadOperation(action);
            InstrumentManualOperationsDownloadEvent     dsEvent   = new InstrumentManualOperationsDownloadEvent(operation);

            dsEvent.GasResponses.Add(new SensorGasResponse());

            Initialize();

            CreateMasterForTest();

            // act
            nextAction = scheduler.GetNextAction(dsEvent);

            // assert
            Xunit.Assert.True(nextAction is InstrumentManualOperationsClearAction);
        }