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)));
        }
예제 #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)));
        }
예제 #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)));
        }
예제 #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));
        }
예제 #5
0
 private void sentIconChanged(Test test, Icon icon)
 {
     events.AssertWasCalled(x => x.SendMessage(new TestIconChanged(test, icon)));
 }
예제 #6
0
 public void should_remove_itself_from_the_event_aggregator()
 {
     theEvents.AssertWasCalled(x => x.RemoveListener(theListener));
 }
예제 #7
0
        public void Execute_should_send_a_reloading_event()
        {
            command.Execute(MockProgressMonitor.Instance);

            eventAggregator.AssertWasCalled(ea => ea.Send(Arg.Is(command), Arg <Reloading> .Is.Anything));
        }
예제 #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));
        }