public void SortTree_should_send_a_SortTreeEvent()
        {
            const SortOrder sortOrder = SortOrder.Ascending;

            controller.SortTree(sortOrder);

            eventAggregator.AssertWasCalled(ea => ea.Send(Arg.Is(controller), Arg <SortTreeEvent> .Matches(ste => ste.SortOrder == sortOrder)));
        }
Beispiel #2
0
        public void Treeview_category_change_is_advertised_if_user_options_are_loaded()
        {
            fileSystem.Stub(fs => fs.FileExists(Arg <string> .Is.Anything))
            .Return(true);
            const string treeViewCategory = "test";

            xmlSerializer.Stub(xs => xs.LoadFromXml <UserOptions>(Arg <string> .Is.Anything))
            .Return(new UserOptions {
                TreeViewCategory = treeViewCategory
            });

            controller.Handle(new ProjectLoaded("test.gallio"));

            eventAggregator.AssertWasCalled(ea => ea.Send(Arg.Is(controller), Arg <TreeViewCategoryChanged> .Matches(tvcc =>
                                                                                                                     tvcc.TreeViewCategory == treeViewCategory)));
        }
Beispiel #3
0
        public void Search_should_send_the_specification_to_the_event_aggregator()
        {
            var specification = MockRepository.GenerateStub <ISpecification <TestTreeNode> >();

            specificationFactory.Stub(sf => sf.Create(Arg <string> .Is.Anything, Arg <string> .Is.Anything))
            .Return(specification);

            searchController.Search("metadataType", "searchText");

            eventAggregator.AssertWasCalled(ea => ea.Send(Arg.Is(searchController), Arg <FilterTreeEvent> .Matches(fte =>
                                                                                                                   fte.Specification == specification)));
        }
        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));
        }
Beispiel #5
0
 private void sentIconChanged(Test test, Icon icon)
 {
     events.AssertWasCalled(x => x.SendMessage(new TestIconChanged(test, icon)));
 }
Beispiel #6
0
 public void should_remove_itself_from_the_event_aggregator()
 {
     theEvents.AssertWasCalled(x => x.RemoveListener(theListener));
 }
        public void Execute_should_send_a_reloading_event()
        {
            command.Execute(MockProgressMonitor.Instance);

            eventAggregator.AssertWasCalled(ea => ea.Send(Arg.Is(command), Arg <Reloading> .Is.Anything));
        }
Beispiel #8
0
        public void Execute_should_reset_test_status()
        {
            openProjectCommand.Execute(MockProgressMonitor.Instance);

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