示例#1
0
        public void MainControllerShouldCallViewBeginWaitOnRunnerStarted()
        {
            Expect.Call(_projectModel.GetProjectFile()).Return(@"c:\test.calidus").Repeat.Times(1);
            Expect.Call(() => _view.BeginWait()).Repeat.Once();

            Mocker.ReplayAll();

            _controller = new MainController(_view, _projectModel, true, _projectManager, _ruleRunner, _violationList);
            _ruleRunner.Raise(x => x.Started += null, this, EventArgs.Empty);

            Mocker.VerifyAll();
        }
示例#2
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();
        }