Пример #1
0
        public void RuleRunnerControllerShouldDisplayProgressPercentageOnFileCompleted()
        {
            Expect.Call(() => _view.DisplayProgressPercentage(25)).Repeat.Once();

            Mocker.ReplayAll();

            RuleRunnerController controller = new RuleRunnerController(_view, _runner, _projectModel, _configFactory);

            _runner.Raise(x => x.FileCompleted += null, this, new FileCompletedEventArgs(String.Empty, 1, 4, new List <RuleViolation>()));

            Mocker.VerifyAll();
        }
Пример #2
0
        private void _runner_FileCompleted(object source, FileCompletedEventArgs e)
        {
            int i = (int)Math.Truncate((double)e.CurrentFileNumber / (double)e.TotalFileNumbers * 100.0);

            _view.DisplayProgressPercentage(i);
        }