Exemple #1
0
        private static ITestSuite GetTestSuite(Assembly assembly, ref RunOptions options)
        {
            TestSuiteBuilder tsb = new TestSuiteBuilder();
            ITestSuite       ts;

            if (String.IsNullOrEmpty(options.Namespace))
            {
                ts = tsb.BuildTest(assembly);
            }
            else
            {
                ts = tsb.BuildTest(assembly, options.Namespace);
            }
            return(ts);
        }
Exemple #2
0
        /// <summary>
        /// Runs the tests in a Type or Method.
        /// </summary>
        public static TestStatus RunMember(ITestListener testListener, Assembly assembly, MemberInfo member)
        {
            TestSuiteBuilder tsb = new TestSuiteBuilder();
            ITestSuite       ts  = tsb.BuildTest(member);

            return(RunTests(ts, testListener));
        }
Exemple #3
0
        /// <summary>
        /// Runs the tests in a namespace.
        /// </summary>
        public static TestStatus RunNamespace(ITestListener testListener, Assembly assembly, string ns)
        {
            TestSuiteBuilder tsb = new TestSuiteBuilder();
            ITestSuite       ts  = tsb.BuildTest(assembly, ns);

            return(RunTests(ts, testListener));
        }
Exemple #4
0
        /// <summary>
        /// Runs the tests in an assembly.
        /// </summary>
        public static TestStatus RunAssembly(ITestListener testListener, Assembly assembly)
        {
            TestSuiteBuilder tsb = new TestSuiteBuilder();
            ITestSuite       ts  = tsb.BuildTest(assembly);

            return(RunTests(ts, testListener));
        }