示例#1
0
        public void StartCharge_usbChargerSimulatorStartChargeIsCalled()
        {
            //Call the method
            _uut.StartCharge();

            //Assert that the method correctly calls StartCharge on the usbCharger
            _usbCharger.Received().StartCharge();
        }
 public void Charge_Started()
 {
     //Clear subs
     _fakeUsbCharger.ClearReceivedCalls();
     //Arrange
     _fakeUsbCharger.Connected.Returns(true);
     //Act
     _uut.StartCharge();
     //Assert
     _fakeUsbCharger.Received(1).StartCharge();
 }