Exemplo n.º 1
0
        public void ReturnManualBumpTestRequiredActionForInstrumentWithBumpFailedSensor()
        {
            // arrange
            InstrumentBumpTestAction action = Helper.GetBumpTestAction(DeviceType.VPRO, new List <string>()
            {
                GasCode.CO, GasCode.H2S, GasCode.O3
            }, DeviceSubType.VentisPro4);

            foreach (InstalledComponent installedComponent in action.Instrument.InstalledComponents.Where(comp => comp.Component is Sensor))
            {
                Sensor sensor = installedComponent.Component as Sensor;
                sensor.BumpTestStatus = false;
            }
            instrument = action.Instrument;
            Initialize();

            CreateMasterForTest();

            // act
            InstrumentBumpTestOperation operation = new InstrumentBumpTestOperation(action);

            dsEvent    = new InstrumentBumpTestEvent(operation);
            nextAction = scheduler.GetNextAction(dsEvent);

            // assert
            Xunit.Assert.True(nextAction is ManualBumpTestRequiredAction);
        }
Exemplo n.º 2
0
        public void ShouldPassMx6InstrumentWithDefaultSensors()
        {
            //This test is not passing currentlly because of improper gasendpoints.

            //Arrange
            InstrumentBumpTestAction action = Helper.GetBumpTestAction(DeviceType.MX6, new List <string> {
                "G0001", "G0002", "G0020"
            });

            Configuration.DockingStation = action.DockingStation;

            //Act
            InstrumentBumpTestOperation operation   = new InstrumentBumpTestOperation(action);
            InstrumentBumpTestEvent     returnEvent = operation.Execute() as InstrumentBumpTestEvent;

            //Assert that all default sensors passed bump test
            Xunit.Assert.NotNull(returnEvent);
            Xunit.Assert.True(returnEvent.GasResponses[0].Passed);
            Xunit.Assert.True(returnEvent.GasResponses[1].Passed);
            Xunit.Assert.True(returnEvent.GasResponses[2].Passed);
            Xunit.Assert.True(returnEvent.GasResponses[3].Passed);
        }