/// <summary> /// Modifies the <paramref name="test"/> by adding categories to it and changing the run state as needed. /// </summary> /// <param name="test">The <see cref="Test"/> to modify.</param> public void ApplyToTest(Test test) { test.Properties.Add("Category", "Live"); if (test.RunState != RunState.NotRunnable) { RecordedTestMode mode = RecordedTestUtilities.GetModeFromEnvironment(); if (mode != RecordedTestMode.Live) { test.RunState = RunState.Ignored; test.Properties.Set("_SKIPREASON", $"Live tests will not run when AZURE_TEST_MODE is {mode}"); } } }
protected RecordedTestBase(bool isAsync) : this(isAsync, RecordedTestUtilities.GetModeFromEnvironment()) { }