Ejemplo n.º 1
0
        public void IsConnected_ConnectedCalled_usbChargerConnectedTrue()
        {
            _usbCharger.Connected.Returns(true);
            bool connected = _uut.IsConnected();

            Assert.That(connected, Is.EqualTo(true));
        }
        public void IsConnected_Connected_IsTrue()
        {
            // Arrange

            // Act
            _mockUsbCharger.Connected.Returns(true);

            // Assert
            Assert.IsTrue(_uut.IsConnected());
        }
        public void IsConnected_MethodReturnsConnectedStatus_IsEqualToSimulatedConnected(bool Connected)
        {
            //act
            FakeCharger.Connected.Returns(Connected);

            uut.IsConnected();

            //assert
            Assert.That(uut.IsConnected, Is.EqualTo(Connected));
        }
Ejemplo n.º 4
0
        public void IsConnected_RecivedFalse_ConnectedIsfalse()
        {
            //Arrange
            IDisplay      disp = Substitute.For <IDisplay>();
            IUsbCharger   usb  = Substitute.For <IUsbCharger>();
            ChargeControl uut  = new ChargeControl(disp, usb);

            usb.Connected.Returns(false);

            //ACT
            bool result = uut.IsConnected();


            //Assert
            Assert.That(result, Is.False);
        }
Ejemplo n.º 5
0
 public void IsConnected_USBCharger_IsConnectedTrue()
 {
     _charge.Connected.Returns(true);
     Assert.That(_uut.IsConnected(), Is.EqualTo(true));
 }
Ejemplo n.º 6
0
 public void TestIsConnected(bool state)
 {
     usbChargerMock.Connected = state;
     Assert.IsTrue(_uut.IsConnected() == state);
 }
Ejemplo n.º 7
0
        public void ChargeControlIsConnected_USBChargerConnected_IsTrue()
        {
            _uut.IsConnected();

            _usbCharger.Connected.Returns(true);
        }
Ejemplo n.º 8
0
 public void ChargeControl_IsConnectedTrue()
 {
     stubUsb.Connected.Returns(true);
     Assert.That(chargeControl.IsConnected());
 }
Ejemplo n.º 9
0
 public void TestIsConnectedMethodTrue()
 {
     _usbCharger.Connected.Returns(true);
     Assert.That(_uut.IsConnected(), Is.True);
 }
Ejemplo n.º 10
0
 public void IsConnectedReturnsValueOfUsbChargerConnected(bool connected)
 {
     _charger.Connected.Returns(connected);
     Assert.That(_uut.IsConnected(), Is.EqualTo(connected));
 }
Ejemplo n.º 11
0
        public void IsConnected_PhoneIsConnected_ReturnsTrue()
        {
            _usbCharger.Connected.Returns(true);

            Assert.IsTrue(_uut.IsConnected());
        }