Example #1
0
        public void Execute_should_remove_all_files()
        {
            var testController        = MockRepository.GenerateStub <ITestController>();
            var projectController     = MockRepository.GenerateStub <IProjectController>();
            var removeAllFilesCommand = new RemoveAllFilesCommand(testController, projectController);
            var progressMonitor       = MockProgressMonitor.Instance;

            removeAllFilesCommand.Execute(progressMonitor);

            projectController.AssertWasCalled(pc => pc.RemoveAllFiles());
        }
Example #2
0
        public void Execute_should_explore()
        {
            var testController        = MockRepository.GenerateStub <ITestController>();
            var projectController     = MockRepository.GenerateStub <IProjectController>();
            var removeAllFilesCommand = new RemoveAllFilesCommand(testController, projectController);
            var progressMonitor       = MockProgressMonitor.Instance;
            var testRunnerExtensions  = new BindingList <string>();

            projectController.Stub(pc => pc.TestRunnerExtensionSpecifications).Return(testRunnerExtensions);

            removeAllFilesCommand.Execute(progressMonitor);

            testController.AssertWasCalled(tc => tc.Explore(progressMonitor, testRunnerExtensions));
        }
Example #3
0
        public void Execute_should_reload_the_test_package()
        {
            var testController        = MockRepository.GenerateStub <ITestController>();
            var projectController     = MockRepository.GenerateStub <IProjectController>();
            var removeAllFilesCommand = new RemoveAllFilesCommand(testController, projectController);
            var progressMonitor       = MockProgressMonitor.Instance;
            var testPackage           = new TestPackage();

            projectController.Stub(pc => pc.TestPackage).Return(testPackage);

            removeAllFilesCommand.Execute(progressMonitor);

            testController.AssertWasCalled(tc => tc.SetTestPackage(testPackage));
        }