public void SetUp() { _door = Substitute.For <IDoor>(); _chargerControl = Substitute.For <IChargerControl>(); _idReader = Substitute.For <IRfIdReader>(); _log = Substitute.For <Ilog>(); _display = Substitute.For <IDisplay>(); _uut = new StationControl(_door, _chargerControl, _idReader, _log, _display); }
public void Setup() { _output = Substitute.For <IStationControlOutput>(); _door = Substitute.For <IDoor>(); _display = Substitute.For <IDisplay>(); _rfidReader = Substitute.For <IRfidReader>(); _chargerControl = Substitute.For <IChargerControl>(); _writer = Substitute.For <IWriter>(); _writer.LogFile = "LogFile.txt"; uut = new StationControl(_door, _chargerControl, _display, _rfidReader, _writer); }
public StationControl(IDoor door, IChargerControl chargeControl, IRfIdReader rfIdReader, Ilog log, IDisplay display) { _door = door; _chargeControl = chargeControl; _rfIdReader = rfIdReader; _display = display; _log = log; _state = LadeskabState.Available; _door.DoorStateChangedEvent += HandleDoorStateChangedEvent; _rfIdReader.RfIdDetectedEvent += HandleRfidDetectedEvent; }
// Her mangler constructor public StationControl(IDoor door, IChargerControl chargerControl, IDisplay display, IRfidReader rfidReader, IWriter writer) { _door = door; _chargeControl = chargerControl; _display = display; _rfidReader = rfidReader; _writer = writer; State = LadeskabState.Available; _door.DoorCloseEvent += HandleDoorClosedEvent; _door.DoorOpenEvent += HandleDoorOpenEvent; _rfidReader.IdRegisteredEvent += HandleRfidRegisteretEvent; }
public void SetUp() { UsbCharger = Substitute.For <IUsbCharger>(); Display = Substitute.For <IDisplay>(); _uut = new ChargerControlSimulator(Display, UsbCharger); }