public void StopCharge_usbChargerSimulatorStopChargeIsCalledDisplaySetToNothing() { //Call the method _uut.StopCharge(); //Assert that the method correctly calls StartCharge on the usbCharger _usbCharger.Received().StopCharge(); Assert.That(_display.CurrentChargeId, Is.EqualTo(DisplayChargeId.Nothing)); }
public void Charge_Stopped() { //Clear subs _fakeUsbCharger.ClearReceivedCalls(); //Arrange _fakeUsbCharger.Connected.Returns(true); //Act _uut.StopCharge(); //Assert _fakeUsbCharger.Received(1).StopCharge(); }