コード例 #1
0
        public void ThrowNotDockedExceptionIfInstrumentNotDocked()
        {
            // arrange
            action = new InstrumentSettingsUpdateAction();
            Initialize();

            InstrumentSettingsUpdateOperation operation = new InstrumentSettingsUpdateOperation(action);

            // act and assert
            Xunit.Assert.Throws <InstrumentNotDockedException>(() => operation.Execute());
        }
コード例 #2
0
        public void ThrowNotDockedExceptionIfInstrumentTypeIsUnknown()
        {
            // arrange
            action     = new InstrumentSettingsUpdateAction();
            instrument = Helper.GetInstrumentForTest(DeviceType.Unknown);

            Initialize();

            InstrumentSettingsUpdateOperation operation = new InstrumentSettingsUpdateOperation(action);

            // act and assert
            Xunit.Assert.Throws <InstrumentNotDockedException>(() => operation.Execute());
        }
コード例 #3
0
        public void ThrowNotDockedExceptionIfInstrumentSerialNumberIsEmpty()
        {
            // arrange
            action         = new InstrumentSettingsUpdateAction();
            dockingStation = Helper.GetDockingStationForTest(DeviceType.MX4);
            instrument     = Helper.GetInstrumentForTest(DeviceType.MX4);

            instrument.SerialNumber = string.Empty;

            Initialize();

            InstrumentSettingsUpdateOperation operation = new InstrumentSettingsUpdateOperation(action);

            // act and assert
            Xunit.Assert.Throws <InstrumentNotDockedException>(() => operation.Execute());
        }