Пример #1
0
        /// <summary>
        /// Executes the test methods identified in the test class.
        /// </summary>
        /// <returns>Returns the results of the execution.</returns>
        internal TestClassResult ExecuteTestCases()
        {
            m_Results = new TestClassResult();

            if (canInstantiateTestClass())
            {
                foreach (MethodInfo method in m_TestMethods)
                {
                    if (setupSucceed())
                    {
                        runTest(method);
                    }
                    runTearDown();
                }
            }

            return(m_Results);
        }
Пример #2
0
        private void executeTestsIn(string module)
        {
            TestModuleInfo info = null;

            try
            {
                info = new TestModuleInfo(module);
                foreach (TestClassInfo testClass in info.TestClasses)
                {
                    TestClassResult results = testClass.ExecuteTestCases();
                    m_Collector.AddTestClassResults(results);
                }
            }
            catch (System.Exception e)
            {
                m_Collector.AddModuleLoadFailure(module, e.Message);
            }
        }