public void Load_should_restore_last_project_used_if_required_and_no_args_supplied()
        {
            const string projectFile = "test.gallio";
            var          arguments   = new IcarusArguments();

            optionsController.RestorePreviousSettings = true;
            optionsController.Stub(oc => oc.RecentProjects).Return(new MRUList(new List <string>(new[] { projectFile }), 10));
            fileSystem.Stub(fs => fs.FileExists(projectFile)).Return(true);
            commandFactory.Stub(cf => cf.CreateOpenProjectCommand(projectFile)).Return(command);

            applicationController.Arguments = arguments;
            applicationController.Load();

            taskManager.AssertWasCalled(t => t.QueueTask(command));
        }
Exemplo n.º 2
0
        public void SetUp()
        {
            eventAggregator = MockRepository.GenerateStub <IEventAggregator>();

            optionsController = MockRepository.GenerateStub <IOptionsController>();
            optionsController.Stub(oc => oc.GetCurrentSettings()).Return(new Settings());

            specificationFactory = MockRepository.GenerateStub <ISpecificationFactory>();

            searchController = new Controller(new Icarus.Search.Model(), eventAggregator,
                                              optionsController, specificationFactory);
        }
 public void SetUp()
 {
     eventAggregator = MockRepository.GenerateStub<IEventAggregator>();
     
     optionsController = MockRepository.GenerateStub<IOptionsController>();
     optionsController.Stub(oc => oc.GetCurrentSettings()).Return(new Settings());
     
     specificationFactory = MockRepository.GenerateStub<ISpecificationFactory>();
     
     searchController = new Controller(new Icarus.Search.Model(), eventAggregator, 
         optionsController, specificationFactory);
 }
Exemplo n.º 4
0
        public void Explore_should_send_an_ExploreStarted_event()
        {
            var progressMonitor = MockProgressMonitor.Instance;

            optionsController.Stub(oc => oc.TestRunnerExtensions).Return(new BindingList <string>(new List <string>()));
            StubTestRunnerFactory();

            testController.Explore(progressMonitor, new List <string>());

            eventAggregator.AssertWasCalled(ea => ea.Send(Arg.Is(testController), Arg <ExploreStarted> .Is.Anything));
        }