示例#1
0
        public void ChargeComplete()
        {
            var output = new StringWriter();

            Console.SetOut(output);

            uut.ChargeComplete();

            Assert.That(output.ToString(), Is.EqualTo("Opladningen er fuldendt og ladningen kan derved stoppes:   "));
        }
示例#2
0
        private void _usbCharger_CurrentValueEvent(object sender, CurrentEventArgs e)
        {
            if (e.Current == 0)
            {
            }
            else if (e.Current > 0 && e.Current <= 5)
            {
                _display.ChargeComplete();
            }
            else if (e.Current > 5 && e.Current <= 500)
            {
                _display.Charging();
            }
            else if (e.Current > 500)
            {
                _display.ChargingError();
                StopCharge();
            }


            _display.CurrentPowerValue(e);
        }