Example #1
0
 public void StoptCharge_Charging_CallsUSB()
 {
     uut.PlugPhoneIn();
     uut.StartCharge();
     uut.StopCharge();
     usb.Received(1).StopCharge();
 }
Example #2
0
 public void Test_StopChargeWhilePluggedIn()
 {
     _chargeControl.IsConnectedToggle();
     _chargeControl.StartCharge();
     _chargeControl.StopCharge();
     _charger.Received(1).StopCharge();
 }
Example #3
0
        public void StopCharge_Call_Sent()
        {
            //act
            uut.StopCharge();

            //assert
            usbCharger.Received(1).StopCharge();
        }
Example #4
0
        public void StopCharge_AllFunctionCallsReceived(int reqNumOfCalls)
        {
            for (int i = 0; i < reqNumOfCalls; i++)
            {
                _uut.StopCharge();
            }

            _charger.Received(reqNumOfCalls).StopCharge();
        }
Example #5
0
        public void StopCharge_StopChargeInUSBcharger_True()
        {
            //Arrange

            //Act
            uut.StopCharge();

            //Assert
            usbCharger.Received(1).StopCharge();
        }
        public void ChargeControl_WhenCurrentIsLow_StopCharging(double var1)
        {
            //arrange
            uut.StopCharge();

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

            //assert
            FakeCharger.Received(1).StopCharge();
            FakeCharger.Received(1).StopCharge();
        }
Example #7
0
        public void ChargeControl_StopCharge_CallsFunctionsCorrect()
        {
            _uut.StopCharge();

            _usbCharger.Received().StopCharge();
            _display.Received().ShowStopCharge();
        }
Example #8
0
        public void ChargeControl_Device_Stop_Charge()
        {
            _uut.StopCharge();
            double CurrentValueEnd = _usbCharger.CurrentValue;

            Assert.That(_usbCharger.CurrentValue, Is.EqualTo(CurrentValueEnd));
        }
Example #9
0
 public void StopCharge_Calls_Usb_StopCharge()
 {
     //Act
     _uut.StopCharge();
     //Assert
     _mockUsbCharger.Received().StopCharge();
 }
        public void StopChargeIsCalledInUUT_StopChargeIsCalledInSUB()
        {
            //Act
            _uut.StopCharge();

            //Assert
            _usbCharger.Received(1).StopCharge();
        }
        public void StopCharge_UsbChargerStops_CalledOnce()
        {
            // Arrange

            // Act
            _uut.StopCharge();

            // Assert
            _mockUsbCharger.Received(1).StopCharge();
        }
        public void stopCharge_methodIsCalled_UsbSimulatorStopChargeIsCalled()
        {
            IUsbCharger _usbCharger = Substitute.For <IUsbCharger>();

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

            uut.StopCharge();

            _usbCharger.Received().StopCharge();
        }
Example #13
0
        public void StopCharge_Called_CallsUsbChargerStopCharge()
        {
            //ARRANGE
            //Arrange completed in setup

            //ACT
            uut.StopCharge();

            //ASSERT
            UsbChargerSubstitute.Received().StopCharge();
        }
Example #14
0
 public void TestStopCharge()
 {
     _uut.StopCharge();
     Assert.AreEqual(1, usbChargerMock.StopChargeCalls);
 }
Example #15
0
        public void ChargeControlStopCharge_USBCharger_StopCharge()
        {
            _uut.StopCharge();

            _usbCharger.Received().StopCharge();
        }
 public void CheckIf_StopCharge_CallsStopCharge()
 {
     _uut.StopCharge();
     _usbCharger.Received(1).StopCharge();
 }
Example #17
0
 public void Test_StopChargeCalledOnes()
 {
     _uut.StopCharge();
     _usbCharger.Received(1).StopCharge();
 }
 public void StopCharging_IsCalled_When_StopCharge_IsCalled()
 {
     _uutC.StopCharge();
     _usbCharger.Received(1).StopCharging();
 }
Example #19
0
 public void StopCharge_StopChargeCalled_usbChargerStopChargeCalled()
 {
     _uut.StopCharge();
     _usbCharger.Received(1).StopCharge();
 }
Example #20
0
 public void StopChargeTest()
 {
     _uut.StopCharge();
     _charger.Received().StopCharge();
 }
Example #21
0
 public void Test_Of_StopChargeFunction()
 {
     _uut.StopCharge();
     _usbCharger.Received().StopCharge();
 }
Example #22
0
 public void StopChargeCallsUsbChargerStopCharge()
 {
     _uut.StopCharge();
     _charger.Received().StopCharge();
     Assert.That(_uut.IsCharging, Is.False);
 }
Example #23
0
        public void TestStopCharge()
        {
            _uut.StopCharge();

            _usbCharger.Received().StopCharge();
        }
Example #24
0
 public void ChargeControl_StopCharge()
 {
     chargeControl.StopCharge();
     stubUsb.Received(1).StopCharge();
 }
Example #25
0
 public void TestStopChargeIsCalled()
 {
     _uut.StopCharge();
     usbCharger.Received().StopCharge();
 }
Example #26
0
 public void StopCharge_ChargeStopped()
 {
     _uut.StopCharge();
     _usbCharger.Received(1).StopCharge();
 }