/// <summary> /// Construct a WorkItem for a particular test. /// </summary> /// <param name="test">The test that the WorkItem will run</param> /// <param name="context">The TestExecutionContext in which it will run</param> public WorkItem(Test test, TestExecutionContext context) { _test = test; _testResult = test.MakeTestResult(); _state = WorkItemState.Ready; _context = context; }
/// <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; }
/// <summary> /// Construct a WorkItem for a particular test. /// </summary> /// <param name="test">The test that the WorkItem will run</param> /// <param name="context">The context to be used for running this test</param> public WorkItem(Test test, TestExecutionContext context) { _test = test; _context = context.Save(); testResult = test.MakeTestResult(); _command = test.GetTestCommand(); _state = WorkItemState.Ready; }
/// <summary> /// Construct a WorkItem for a particular test. /// </summary> /// <param name="test">The test that the WorkItem will run</param> public WorkItem(Test test) { Test = test; Result = test.MakeTestResult(); State = WorkItemState.Ready; Actions = new List<ITestAction>(); #if !PORTABLE && !NETSTANDARD1_6 TargetApartment = Test.Properties.ContainsKey(PropertyNames.ApartmentState) ? (ApartmentState)Test.Properties.Get(PropertyNames.ApartmentState) : ApartmentState.Unknown; #endif }
/// <summary> /// Construct a WorkItem for a particular test. /// </summary> /// <param name="test">The test that the WorkItem will run</param> public WorkItem(Test test) { _test = test; Result = test.MakeTestResult(); _state = WorkItemState.Ready; }