public void TestChargerIsConnectedIsCalledForStateAvailable() { //Default state of the station is available //Send event _reader.RFIDReadEvent += Raise.EventWith(new RFIDReaderEventArgs()); //Check that the expected functions were called _charger.Received(1).IsConnected(); }
public void ChargeControl_StopCharge_ConnectedIsTrue_stopChargeIsCalled() { //Arrange _charger = Substitute.For <ICharger>(); _display = Substitute.For <IDisplay>(); _uut = new ChargeControl(_charger, _display); _charger.Connected = true; //Act _uut.StopCharge(); //Assert _charger.Received().StopCharge(); }
public void RfidDetected_StateAvailable_ChargerIsConnected() { rfidReader.DetectRfid += Raise.EventWith(this, new RfidChangedEventArgs()); charger.Received(1).IsConnected(); }