/// <summary> /// Construct a WorkItem for a particular test. /// </summary> /// <param name="test">The test that the WorkItem will run</param> public WorkItem(Test test, FinallyDelegate finallyDelegate) { _test = test; testResult = test.MakeTestResult(); _state = WorkItemState.Ready; finD = finallyDelegate; }
// ITestAssemblyRunner runner; public IncrementalTestRunner() { this.finallyDelegate = new FinallyDelegate(); this.builder = new NUnitLiteTestAssemblyBuilder(); // this.runner = new NUnitLiteTestAssemblyRunner(new NUnitLiteTestAssemblyBuilder(), finallyDelegate); this.loadOptions = new Hashtable(); }
/// <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="childFilter">A filter used to select child tests</param> public CompositeWorkItem(TestSuite suite, ITestFilter childFilter, FinallyDelegate fd) : base(suite, fd) { _suite = suite; _setupCommand = suite.GetOneTimeSetUpCommand(); _teardownCommand = suite.GetOneTimeTearDownCommand(); _childFilter = childFilter; }
/// <summary> /// Initializes a new instance of the <see cref="TextUI"/> class. /// </summary> /// <param name="writer">The TextWriter to use.</param> /// <param name="listener">The Test listener to use.</param> public TextUI(TextWriter writer, ITestListener listener) { // Set the default writer - may be overridden by the args specified this.writer = writer; this.finallyDelegate = new FinallyDelegate(); this.runner = new NUnitLiteTestAssemblyRunner(new NUnitLiteTestAssemblyBuilder(), this.finallyDelegate); this.listener = listener; }
/// <summary> /// Initializes a new instance of the <see cref="TextUI"/> class. /// </summary> /// <param name="writer">The TextWriter to use.</param> /// <param name="listener">The Test listener to use.</param> public TextUI(TextWriter writer, ITestListener listener) { // Set the default writer - may be overridden by the args specified this.writer = writer; this.finallyDelegate = new FinallyDelegate(); this.runner = new NUnitLiteTestAssemblyRunner(new NUnitLiteTestAssemblyBuilder(), this.finallyDelegate); this.listener = listener; AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(this.TopLevelHandler); }
/// <summary> /// Construct a simple work item for a test command. /// </summary> /// <param name="command">The command to be executed</param> public SimpleWorkItem(TestCommand command, FinallyDelegate fd) : base(command.Test, fd) { _command = command; }
/// <summary> /// Construct a simple work item for a test. /// </summary> /// <param name="test">The test to be executed</param> public SimpleWorkItem(TestMethod test, FinallyDelegate fd) : base(test, fd) { _command = test.MakeTestCommand(); }