public void ThrowNotDockedExceptionIfInstrumentNotDocked() { // arrange action = new InstrumentSettingsUpdateAction(); Initialize(); InstrumentSettingsUpdateOperation operation = new InstrumentSettingsUpdateOperation(action); // act and assert Xunit.Assert.Throws <InstrumentNotDockedException>(() => operation.Execute()); }
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()); }
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()); }
public void GetScheduledInstrumentDiagnosticsAction() { // arrange instrument = Helper.GetInstrumentForTest(DeviceType.VPRO, DeviceSubType.VentisPro4); dockingStation = Helper.GetDockingStationForTest(DeviceType.MX4); InstrumentSettingsUpdateOperation operation = new InstrumentSettingsUpdateOperation(); Initialize(); // act schema.Setup(x => x.Activated).Returns(true); dsEvent = new InstrumentSettingsUpdateEvent(operation); CreateMasterForTest(); nextAction = scheduler.GetNextAction(dsEvent); // assert Xunit.Assert.True(nextAction is InstrumentDiagnosticAction); }