コード例 #1
0
 /// <summary>
 /// Sets the test context for the given test state and engine status.
 /// </summary>
 /// <param name="ctxt">The invoker context</param>
 /// <param name="testStatus">The current engine status for the test</param>
 /// <param name="testState">The current test state</param>
 protected virtual void SetTestContext(
     TContext ctxt,
     TestEngineStatus testStatus,
     TestState?testState = null) =>
 TestContext.SetForTest(ctxt.Test, testStatus, ctxt.CancellationTokenSource.Token, testState);
コード例 #2
0
ファイル: TestClassRunner.cs プロジェクト: jbhensley/xunit
 /// <summary>
 /// Sets the current <see cref="TestContext"/> for the current test class and the given test class status.
 /// Does nothing when <see cref="TestClass"/> is <c>null</c>.
 /// </summary>
 /// <param name="ctxt">The context that describes the current test class</param>
 /// <param name="testClassStatus">The current test class status.</param>
 protected virtual void SetTestContext(
     TContext ctxt,
     TestEngineStatus testClassStatus) =>
 TestContext.SetForTestClass(ctxt.TestClass, testClassStatus, ctxt.CancellationTokenSource.Token);