Beispiel #1
0
        public void InitiateCharging_Invokes_USBCharger()
        {
            //arrange

            //act
            _uut.InitiateCharging();

            //assert
            _usbCharger.Received(1).InitiateCharging();
        }
Beispiel #2
0
        public void Test_HandleRFIDChangedEvent_WhenAvailableAndChargeControlConnected_RFIDChangedEventRaised_MethodCallCorrect()
        {
            _chargeControl.IsConnected().Returns(true);
            _rfidReader.RFIDChangedEvent += Raise.EventWith(new RFIDChangedEventArgs {
                RFID = 10
            });

            _door.Received().LockDoor();
            _usbCharger.Received().StartCharge();
            _fileWriter.Received().LogDoorLocked(10);
            _display.Received().WriteMessage("Box is taken and locked with RFID: " + 10);
        }
        public void Test_StartCharge_IsCalled()
        {
            _uut.StartCharge();

            _usbCharger.Received(1).StartCharge();
        }