Exemple #1
0
        public void ReturnedBatteriesExistsCase1002Test()
        {
            BaseController.SelectedBettery = null;

            bool expected = false;
            bool actual   = CountDownController.ReturnedBatteriesExists();

            Assert.AreEqual(expected, actual);
        }
Exemple #2
0
        public void ReturnedBatteriesExistsCase1001Test()
        {
            BaseController.SelectedBettery = new BetteryVend
            {
                AaReturn = 1
            };

            bool expected = true;
            bool actual   = CountDownController.ReturnedBatteriesExists();

            Assert.AreEqual(expected, actual);
        }
Exemple #3
0
        /// <summary>
        /// Starts the count down.
        /// </summary>
        private void StartCountDown()
        {
            _currentControlFocus = BaseController.CurrentControlFocus;

            CurrentPopupTimeOut = PopupTimeOut;
            if (CountDownController.ReturnedBatteriesExists())
            {
                UpdateMessage(Constants.Messages.ReturnBatteriesMessage);
            }
            else
            {
                UpdateMessage(Constants.Messages.DefaultMessage);
            }

            UIHelper.DispatchThread(this, main => main.Visibility = Visibility.Visible);
            UpdateTime(CurrentPopupTimeOut);

            _timerCountDown.Start();
            _timer.Stop();
        }