Exemplo n.º 1
0
 /// <summary>
 /// Starts a child step of the context.
 /// </summary>
 /// <param name="name">The name of the step.</param>
 /// <param name="codeElement">The code element, or null if none.</param>
 /// <param name="isTestCase">True if the step represents an independent test case.</param>
 /// <returns>The context of the child step.</returns>
 /// <exception cref="ArgumentNullException">Thrown if <paramref name="name"/> is null.</exception>
 internal TestContext StartChildStep(string name, ICodeElementInfo codeElement, bool isTestCase)
 {
     Model.Tree.TestStep testStep = new Model.Tree.TestStep(inner.TestStep.Test, inner.TestStep, name, codeElement, false);
     testStep.IsTestCase = isTestCase;
     testStep.IsDynamic  = true;
     return(PrepareContext(inner.StartChildStep(testStep), Sandbox.CreateChild()));
 }
Exemplo n.º 2
0
 private static ITestContext SafeStartChildStep(ITestContext parentTestContext, TestStep testStep)
 {
     using (TestContextTrackerAccessor.Instance.EnterContext(parentTestContext))
         return(parentTestContext.StartChildStep(testStep));
 }
Exemplo n.º 3
0
 private static ITestContext SafeStartChildStep(ITestContext parentTestContext, TestStep testStep)
 {
     using (TestContextTrackerAccessor.Instance.EnterContext(parentTestContext))
         return parentTestContext.StartChildStep(testStep);
 }