예제 #1
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);
			}
		}
 internal SourceCodeLocation GetSourceCodeLocation(UnitTest test)
 {
     if (test is NUnitTestCase)
     {
         NUnitTestCase t = (NUnitTestCase)test;
         return(GetSourceCodeLocation(t.ClassName, t.Name));
     }
     else if (test is NUnitTestSuite)
     {
         NUnitTestSuite t = (NUnitTestSuite)test;
         return(GetSourceCodeLocation(t.ClassName, null));
     }
     else
     {
         return(null);
     }
 }
예제 #3
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);
            }
        }
예제 #4
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);
 }
		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);
		}