コード例 #1
0
        private MbUnit2AssemblyTest BuildAssemblyTest(Test parent, ICollection <KeyValuePair <Test, string> > unresolvedDependencies)
        {
            FixtureExplorer fixtureExplorer = InitializeFixtureExplorer(assembly);
            IAssemblyInfo   assemblyInfo    = Reflector.Wrap(assembly);

            MbUnit2AssemblyTest assemblyTest = new MbUnit2AssemblyTest(fixtureExplorer, assemblyInfo);

            PopulateAssemblyTestMetadata(assemblyTest, assemblyInfo);

            foreach (Fixture fixture in fixtureExplorer.FixtureGraph.Fixtures)
            {
                MbUnit2Test fixtureTest = CreateFixtureTest(fixture);

                foreach (RunPipeStarter starter in fixture.Starters)
                {
                    MbUnit2Test test = CreateTest(starter.Pipe);

                    fixtureTest.AddChild(test);
                }

                assemblyTest.AddChild(fixtureTest);
            }

            foreach (string assemblyName in fixtureExplorer.GetDependentAssemblies())
            {
                unresolvedDependencies.Add(new KeyValuePair <Test, string>(assemblyTest, assemblyName));
            }

            parent.AddChild(assemblyTest);
            return(assemblyTest);
        }
コード例 #2
0
        private MbUnit2AssemblyTest BuildAssemblyTest(Test parent, ICollection<KeyValuePair<Test, string>> unresolvedDependencies)
        {
            FixtureExplorer fixtureExplorer = InitializeFixtureExplorer(assembly);
            IAssemblyInfo assemblyInfo = Reflector.Wrap(assembly);

            MbUnit2AssemblyTest assemblyTest = new MbUnit2AssemblyTest(fixtureExplorer, assemblyInfo);
            PopulateAssemblyTestMetadata(assemblyTest, assemblyInfo);

            foreach (Fixture fixture in fixtureExplorer.FixtureGraph.Fixtures)
            {
                MbUnit2Test fixtureTest = CreateFixtureTest(fixture);

                foreach (RunPipeStarter starter in fixture.Starters)
                {
                    MbUnit2Test test = CreateTest(starter.Pipe);

                    fixtureTest.AddChild(test);
                }

                assemblyTest.AddChild(fixtureTest);
            }

            foreach (string assemblyName in fixtureExplorer.GetDependentAssemblies())
                unresolvedDependencies.Add(new KeyValuePair<Test, string>(assemblyTest, assemblyName));

            parent.AddChild(assemblyTest);
            return assemblyTest;
        }
コード例 #3
0
 public override void ExploreAssembly(bool skipChildren, ICollection <KeyValuePair <Test, string> > unresolvedDependencies)
 {
     if (assemblyTest == null)
     {
         assemblyTest = BuildAssemblyTest(testModel.RootTest, unresolvedDependencies);
     }
 }
コード例 #4
0
 public override void ExploreAssembly(bool skipChildren, ICollection<KeyValuePair<Test, string>> unresolvedDependencies)
 {
     if (assemblyTest == null)
     {
         assemblyTest = BuildAssemblyTest(testModel.RootTest, unresolvedDependencies);
     }
 }