Esempio n. 1
0
 /// <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;
 }
Esempio n. 2
0
        /// <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;
        }
Esempio n. 3
0
 /// <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;
 }
Esempio n. 4
0
        /// <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
        }
Esempio n. 5
0
 /// <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;
 }