internal static InstrumentDatalogClearAction GetDatalogClearAction(DeviceType deviceType, DeviceSubType subType = DeviceSubType.None) { InstrumentDatalogClearAction action = new InstrumentDatalogClearAction(); action.DockingStation = GetDockingStationForTest(deviceType); action.Instrument = GetInstrumentForTest(deviceType, subType); return(action); }
private void InitializeForTest(InstrumentDatalogClearAction action) { InitializeMocks(action); Configuration.DockingStation = action.DockingStation; Configuration.Schema = Helper.GetSchemaForTest(); CreateMasterForMockTest(); }
public void ClearAlarmEvents() { // arrange InstrumentDatalogClearAction action = Helper.GetDatalogClearAction(DeviceType.MX4); InitializeForTest(action); instrumentController.Setup(x => x.ClearDatalog()); InstrumentDatalogClearOperation datalogClearOperation = new InstrumentDatalogClearOperation(action); InstrumentDatalogClearEvent datalogClearEvent = (InstrumentDatalogClearEvent)datalogClearOperation.Execute(); instrumentController.Verify(x => x.ClearDatalog(), Times.Once); }
private void InitializeMocks(InstrumentDatalogClearAction datalogClearAction) { instrumentController = MockHelper.GetInstrumentControllerMock(); switchServiceInt = MockHelper.GetSwitchServiceMock(datalogClearAction.Instrument, false, instrumentController.Object); controllerWrapper = MockHelper.GetControllerMock(datalogClearAction.DockingStation, datalogClearAction.Instrument); }
public InstrumentDatalogClearOperation(InstrumentDatalogClearAction instrumentDatalogClearAction) : base(instrumentDatalogClearAction) { }