public OutlineTreeBuilder(Test test, FixtureLibrary library, IOutlineConfigurer configurer)
 {
     var workspace = test.GetWorkspace();
     _library = library.Filter(workspace.CreateFixtureFilter().Matches);
     _test = test;
     _configurer = configurer;
 }
        private OutlineTreeBuilder builder(IOutlineController controller, Test test)
        {
            var configurer = new OutlineConfigurer(controller);
            var filter = test.GetWorkspace().CreateFixtureFilter();
            var filteredLibrary = _context.Library.Filter(filter.Matches);

            return new OutlineTreeBuilder(test, filteredLibrary, configurer);
        }
Exemple #3
0
        public void return_the_workspace_filter_from_the_ultimate_parent_suite()
        {
            var workspaceSuite = new WorkspaceSuite("suite")
            {
                Filter = new WorkspaceFilter()
                {
                    Filters = new FixtureFilter[] { FixtureFilter.Namespace("NS1") }
                }
            };

            var test = new Test("something");
            var suite = new Suite("a suite");
            suite.AddTest(test);

            workspaceSuite.AddSuite(suite);

            test.GetWorkspace().ShouldBeTheSameAs(workspaceSuite.Filter);
        }
Exemple #4
0
 public void return_a_blank_workspace_if_test_has_no_parent()
 {
     var test = new Test("something");
     var workspace = test.GetWorkspace();
     workspace.ShouldNotBeNull();
     workspace.Filters.ShouldHaveTheSameElementsAs(FixtureFilter.All());
 }