public void ThrowNotDockedExceptionIfInstrumentNotDocked() { // arrange action = new InstrumentSettingsReadAction(); Initialize(); InstrumentSettingsReadOperation operation = new InstrumentSettingsReadOperation(action); // act and assert Xunit.Assert.Throws <InstrumentNotDockedException>(() => operation.Execute()); }
public void ExecuteInstrumentSettingsReadOperation() { // arrange InstrumentSettingsReadAction action = new InstrumentSettingsReadAction(); dockingStation = Helper.GetDockingStationForTest(DeviceType.MX4); instrument = Helper.GetInstrumentForTest(DeviceType.VPRO, DeviceSubType.VentisPro5); Initialize(); InstrumentSettingsReadOperation operation = new InstrumentSettingsReadOperation(action); // act InstrumentSettingsReadEvent dsEvent = (InstrumentSettingsReadEvent)operation.Execute(); // assert Instrument testInstrument = dsEvent.DockedInstrument; Xunit.Assert.True(testInstrument.SerialNumber == instrument.SerialNumber && testInstrument.Type == instrument.Type && testInstrument.Subtype == instrument.Subtype && testInstrument.SoftwareVersion == instrument.SoftwareVersion && testInstrument.BumpTimeout == instrument.BumpTimeout); }
public InstrumentSettingsReadOperation(InstrumentSettingsReadAction instrumentSettingsReadAction) : base(instrumentSettingsReadAction) { }