Пример #1
0
        void FillTests(NunitTestInfo ti)
        {
            if (ti.Tests == null)
            {
                return;
            }

            foreach (NunitTestInfo test in ti.Tests)
            {
                var newTest = new NUnitTestSuite(this, test);
                newTest.FixtureTypeName      = test.FixtureTypeName;
                newTest.FixtureTypeNamespace = test.FixtureTypeNamespace;

                newTest.ChildStatus(test, out bool isNamespace, out bool hasClassAsChild);

                if (!isNamespace || hasClassAsChild)
                {
                    Tests.Add(newTest);
                }

                var forceLoad = newTest.Tests;
                foreach (NUnitTestSuite child in newTest.ChildNamespaces)
                {
                    child.Title = newTest.Title + "." + child.Title;
                    Tests.Add(child);
                }
            }
            oldList = new UnitTest [Tests.Count];
            Tests.CopyTo(oldList, 0);
        }
Пример #2
0
		protected override void OnCreateTests ()
		{
			if (testInfo.Tests == null)
				return;
			
			foreach (NunitTestInfo test in testInfo.Tests) {
				UnitTest newTest;
				if (test.Tests != null)
					newTest = new NUnitTestSuite (rootSuite, test);
				else
					newTest = new NUnitTestCase (rootSuite, test, ClassName);
				newTest.FixtureTypeName = test.FixtureTypeName;
				newTest.FixtureTypeNamespace = test.FixtureTypeNamespace;
				Tests.Add (newTest);
			}
		}
Пример #3
0
        protected override void OnCreateTests()
        {
            if (testInfo.Tests == null)
            {
                return;
            }

            foreach (NunitTestInfo test in testInfo.Tests)
            {
                if (test.Tests != null)
                {
                    var newTest = new NUnitTestSuite(rootSuite, test);
                    newTest.FixtureTypeName      = test.FixtureTypeName;
                    newTest.FixtureTypeNamespace = test.FixtureTypeNamespace;

                    ChildStatus(test, out bool isNamespace, out bool hasClassAsChild);

                    if (isNamespace)
                    {
                        var forceLoad = newTest.Tests;
                        foreach (var child in newTest.ChildNamespaces)
                        {
                            child.Title = newTest.Title + "." + child.Title;
                            childNamespaces.Add(child);
                        }
                        if (hasClassAsChild)
                        {
                            childNamespaces.Add(newTest);
                        }
                    }
                    else
                    {
                        Tests.Add(newTest);
                    }
                }
                else
                {
                    var newTest = new NUnitTestCase(rootSuite, test, ClassName);
                    newTest.FixtureTypeName      = test.FixtureTypeName;
                    newTest.FixtureTypeNamespace = test.FixtureTypeNamespace;
                    Tests.Add(newTest);
                }
            }
        }
Пример #4
0
        protected override void OnCreateTests()
        {
            if (testInfo.Tests == null)
            {
                return;
            }

            foreach (NunitTestInfo test in testInfo.Tests)
            {
                UnitTest newTest;
                if (test.Tests != null)
                {
                    newTest = new NUnitTestSuite(rootSuite, test);
                }
                else
                {
                    newTest = new NUnitTestCase(rootSuite, test, ClassName);
                }
                newTest.FixtureTypeName      = test.FixtureTypeName;
                newTest.FixtureTypeNamespace = test.FixtureTypeNamespace;
                Tests.Add(newTest);
            }
        }
 void FillTests(NunitTestInfo ti)
 {
     if (ti.Tests == null)
     {
         return;
     }
     foreach (NunitTestInfo test in ti.Tests)
     {
         UnitTest newTest;
         if (test.Tests != null)
         {
             newTest = new NUnitTestSuite(this, test);
         }
         else
         {
             newTest = new NUnitTestCase(this, test, test.PathName);
         }
         newTest.FixtureTypeName      = test.FixtureTypeName;
         newTest.FixtureTypeNamespace = test.FixtureTypeNamespace;
         Tests.Add(newTest);
     }
     oldList = new UnitTest [Tests.Count];
     Tests.CopyTo(oldList, 0);
 }
		void FillTests (NunitTestInfo ti)
		{
			if (ti.Tests == null)
				return;
			foreach (NunitTestInfo test in ti.Tests) {
				UnitTest newTest;
				if (test.Tests != null)
					newTest = new NUnitTestSuite (this, test);
				else
					newTest = new NUnitTestCase (this, test, test.PathName);
				newTest.FixtureTypeName = test.FixtureTypeName;
				newTest.FixtureTypeNamespace = test.FixtureTypeNamespace;
				Tests.Add (newTest);

			}
			oldList = new UnitTest [Tests.Count];
			Tests.CopyTo (oldList, 0);
		}