diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2020-04-20 19:09:33 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2020-04-20 19:09:33 -0400 |
| commit | 7c1e566113d59699af1624186c64eca67f063fc6 (patch) | |
| tree | 5a6850a695986872d5d0b09d7dab8421628fe33e /Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestExecutionContext.cs | |
| parent | dd117b77aae1d8be7563b360d05b842a73b7dab2 (diff) | |
| download | Project-Sandbox-7c1e566113d59699af1624186c64eca67f063fc6.tar.gz Project-Sandbox-7c1e566113d59699af1624186c64eca67f063fc6.tar.bz2 Project-Sandbox-7c1e566113d59699af1624186c64eca67f063fc6.zip | |
Upgraded Unity
Diffstat (limited to 'Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestExecutionContext.cs')
| -rw-r--r-- | Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestExecutionContext.cs | 130 |
1 files changed, 0 insertions, 130 deletions
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestExecutionContext.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestExecutionContext.cs deleted file mode 100644 index ca17b70..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestExecutionContext.cs +++ /dev/null @@ -1,130 +0,0 @@ -using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.IO;
-using NUnit.Framework;
-using NUnit.Framework.Constraints;
-using NUnit.Framework.Interfaces;
-using NUnit.Framework.Internal;
-using NUnit.Framework.Internal.Execution;
-using UnityEngine.TestTools;
-
-namespace UnityEngine.TestRunner.NUnitExtensions.Runner
-{
- internal class UnityTestExecutionContext : ITestExecutionContext
- {
- private readonly UnityTestExecutionContext _priorContext;
- private TestResult _currentResult;
- private int _assertCount;
-
- public static UnityTestExecutionContext CurrentContext { get; set; }
-
- public UnityTestExecutionContext Context { get; private set; }
-
- public Test CurrentTest { get; set; }
- public DateTime StartTime { get; set; }
- public long StartTicks { get; set; }
- public TestResult CurrentResult
- {
- get { return _currentResult; }
- set
- {
- _currentResult = value;
- if (value != null)
- OutWriter = value.OutWriter;
- }
- }
-
- public object TestObject { get; set; }
- public string WorkDirectory { get; set; }
-
-
- private TestExecutionStatus _executionStatus;
- public TestExecutionStatus ExecutionStatus
- {
- get
- {
- // ExecutionStatus may have been set to StopRequested or AbortRequested
- // in a prior context. If so, reflect the same setting in this context.
- if (_executionStatus == TestExecutionStatus.Running && _priorContext != null)
- _executionStatus = _priorContext.ExecutionStatus;
-
- return _executionStatus;
- }
- set
- {
- _executionStatus = value;
-
- // Push the same setting up to all prior contexts
- if (_priorContext != null)
- _priorContext.ExecutionStatus = value;
- }
- }
-
- public List<ITestAction> UpstreamActions { get; private set; }
- public int TestCaseTimeout { get; set; }
- public CultureInfo CurrentCulture { get; set; }
- public CultureInfo CurrentUICulture { get; set; }
- public ITestListener Listener { get; set; }
-
- public UnityTestExecutionContext()
- {
- UpstreamActions = new List<ITestAction>();
- CurrentContext = this;
- }
-
- public UnityTestExecutionContext(UnityTestExecutionContext other)
- {
- _priorContext = other;
-
- CurrentTest = other.CurrentTest;
- CurrentResult = other.CurrentResult;
- TestObject = other.TestObject;
- WorkDirectory = other.WorkDirectory;
- Listener = other.Listener;
- TestCaseTimeout = other.TestCaseTimeout;
- UpstreamActions = new List<ITestAction>(other.UpstreamActions);
- SetUpTearDownState = other.SetUpTearDownState;
- OuterUnityTestActionState = other.OuterUnityTestActionState;
-
- TestContext.CurrentTestExecutionContext = this;
-
- CurrentCulture = other.CurrentCulture;
- CurrentUICulture = other.CurrentUICulture;
- CurrentContext = this;
- }
-
- public TextWriter OutWriter { get; private set; }
- public bool StopOnError { get; set; }
-
- public IWorkItemDispatcher Dispatcher { get; set; }
-
- public ParallelScope ParallelScope { get; set; }
- public string WorkerId { get; private set; }
- public Randomizer RandomGenerator { get; private set; }
- public ValueFormatter CurrentValueFormatter { get; private set; }
- public bool IsSingleThreaded { get; set; }
- public BeforeAfterTestCommandState SetUpTearDownState { get; set; }
- public BeforeAfterTestCommandState OuterUnityTestActionState { get; set; }
- public int EnumerableRepeatedTestState { get; set; }
- public int EnumerableRetryTestState { get; set; }
-
- internal int AssertCount
- {
- get
- {
- return _assertCount;
- }
- }
-
- public void IncrementAssertCount()
- {
- _assertCount += 1;
- }
-
- public void AddFormatter(ValueFormatterFactory formatterFactory)
- {
- throw new NotImplementedException();
- }
- }
-}
|
