Ejemplo n.º 1
0
 /// <summary>
 /// Construct a CompositeWorkItem for executing a test suite
 /// using a filter to select child tests.
 /// </summary>
 /// <param name="suite">The TestSuite to be executed</param>
 /// <param name="context">The execution context in which to run the suite</param>
 /// <param name="childFilter">A filter used to select child tests</param>
 public CompositeWorkItem(TestSuite suite, TestExecutionContext context, ITestFilter childFilter)
     : base(suite, context)
 {
     _suite        = suite;
     _suiteCommand = Command as TestSuiteCommand;
     _childFilter  = childFilter;
 }
Ejemplo n.º 2
0
        protected override TestCommand MakeTestCommand(ITestFilter filter)
        {
            TestCommand testCommand = new TestSuiteCommand(this);

            foreach (Test test in Tests)
            {
                if (filter.Pass(test))
                {
                    testCommand.Children.Add(test.GetTestCommand(filter));
                }
            }
            return(testCommand);
        }
Ejemplo n.º 3
0
        protected override TestCommand MakeTestCommand(ITestFilter filter)
        {
            TestCommand command = new TestSuiteCommand(this);

            foreach (Test childTest in Tests)
            {
                if (filter.Pass(childTest))
                {
                    command.Children.Add(childTest.GetTestCommand(filter));
                }
            }

#if !NUNITLITE && false
            if (ShouldRunOnOwnThread)
            {
                command = new ThreadedTestCommand(command);
            }
#endif

            return(command);
        }