示例#1
0
        public void ChargeControl_Device_Start_Charge()
        {
            _uut.ConnectDevice();
            _uut.StartCharge();
            double CurrentValueStart = _usbCharger.CurrentValue;

            Assert.That(_usbCharger.CurrentValue, Is.EqualTo(CurrentValueStart));
        }
示例#2
0
        public void StartCharge_Call_Sent()
        {
            //act
            uut.StartCharge();

            //assert
            usbCharger.Received(1).StartCharge();
        }
示例#3
0
        public void StartCharge_AllFunctionCallsReceived(int reqNumOfCalls)
        {
            for (int i = 0; i < reqNumOfCalls; i++)
            {
                _uut.StartCharge();
            }

            _charger.Received(reqNumOfCalls).StartCharge();
        }
示例#4
0
 public void StartCharge_Calls_Usb_StartCharge()
 {
     //Act
     _uut.StartCharge();
     //Assert
     _mockUsbCharger.Received().StartCharge();
 }
示例#5
0
        public void ChargeControl_StartCharge_CallsFunctionsCorrect()
        {
            _uut.StartCharge();

            _usbCharger.Received().StartCharge();
            _display.Received().ShowCharging();
        }
        public void StartChargeIsCalledInUUT_StartChargeIsCalledInSUB()
        {
            //Act
            _uut.StartCharge();

            //Assert
            _usbCharger.Received(1).StartCharge();
        }
示例#7
0
        public void StartCharge_UsbChargeStart_CallOnce()
        {
            //Arrange

            //Act
            _uut.StartCharge();
            //Assert
            _mockUsbCharger.Received(1).StartCharge();
        }
示例#8
0
        public void StartCharge_StartChargeInUSBcharger_True()
        {
            //Arrange

            //Act
            uut.StartCharge();

            //Assert
            usbCharger.Received(1).StartCharge();
        }
        public void startCharge_methodIsCalled_UsbSimulatorStartChargeIsCalled()
        {
            IUsbCharger _usbCharger = Substitute.For <IUsbCharger>();

            var uut = new ChargeControl(_usbCharger, new Display());

            uut.StartCharge();

            _usbCharger.Received().StartCharge();
        }
示例#10
0
        public void StartCharge_Called_CallsUsbChargerStartCharge()
        {
            //ARRANGE
            //Arrange completed in setup

            //ACT
            uut.StartCharge();

            //ASSERT
            UsbChargerSubstitute.Received().StartCharge();
        }
        public void ChargeControl_WhenCurrentIsHigh_StartCharging(double current)
        {
            //arrange
            uut.StartCharge();

            //act
            FakeCharger.CurrentValueEvent += Raise.EventWith(this, new CurrentEventArgs {
                Current = current
            });

            //assert
            FakeCharger.Received(1).StartCharge();
            FakeCharger.Received(1).StartCharge();
        }
示例#12
0
        public void TestStartCharge()
        {
            _uut.StartCharge();

            _usbCharger.Received().StartCharge();
        }
示例#13
0
 public void StartChargeTest()
 {
     _uut.StartCharge();
     _charger.Received().StartCharge();
 }
示例#14
0
 public void TestStartCharge()
 {
     _uut.StartCharge();
     Assert.AreEqual(1, usbChargerMock.StartChargeCalls);
 }
示例#15
0
        public void CurrentCurrentValues_DoNOTCallMethod_DisplayNothing(double current)
        {
            _uut.StartCharge();

            _usbCharger.CurrentValueEvent += Raise.EventWith(new CurrentEventArgs {
                Current = current
            });

            //_display.DidNotReceive().DisplayNothing();
            _display.DidNotReceive().writeDisplay("Display nothing");
        }
示例#16
0
 public void StartCharging_IsCalled_When_StartCharge_IsCalled()
 {
     _uutC.StartCharge();
     _usbCharger.Received(1).StartCharging();
 }
示例#17
0
 public void Test_StartChargeCalledOnes()
 {
     _uut.StartCharge();
     _usbCharger.Received(1).StartCharge();
 }
示例#18
0
 public void Test_StartChargeWhileUnplugged()
 {
     _chargeControl.StartCharge();
     _charger.Received(0).StartCharge();
 }
示例#19
0
 public void ChargeControl_StartCharge()
 {
     chargeControl.StartCharge();
     stubUsb.Received(1).StartCharge();
 }
示例#20
0
 public void Test_Of_StartChargeFunction()
 {
     _uut.StartCharge();
     _usbCharger.Received(1).StartCharge();
 }
示例#21
0
 public void StartChargeCallsUsbChargerStartCharge()
 {
     _uut.StartCharge();
     _charger.Received().StartCharge();
     Assert.That(_uut.IsCharging, Is.True);
 }
示例#22
0
 public void StartCharge_ChargeStarted()
 {
     _uut.StartCharge();
     _usbCharger.Received(1).StartCharge();
 }
示例#23
0
 public void StartCharge_StartChargeCalled_usbChargerStartChargeCalled()
 {
     _uut.StartCharge();
     _usbCharger.Received(1).StartCharge();
 }
 public void CheckIf_StartCharge_CallsStartCharge()
 {
     _uut.StartCharge();
     _usbCharger.Received(1).StartCharge();
 }
示例#25
0
 public void StartCharge_PluggedIn_CallsUSB()
 {
     uut.PlugPhoneIn();
     uut.StartCharge();
     usb.Received(1).StartCharge();
 }