| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | namespace Azure.Core.TestFramework |
| | 5 | | { |
| | 6 | | public abstract class RecordedTestBase<TEnvironment> : RecordedTestBase where TEnvironment: TestEnvironment, new() |
| | 7 | | { |
| 544 | 8 | | protected RecordedTestBase(bool isAsync) : base(isAsync) |
| | 9 | | { |
| 544 | 10 | | TestEnvironment = new TEnvironment(); |
| 544 | 11 | | TestEnvironment.Mode = Mode; |
| 544 | 12 | | } |
| | 13 | |
|
| 126 | 14 | | protected RecordedTestBase(bool isAsync, RecordedTestMode mode) : base(isAsync, mode) |
| | 15 | | { |
| 126 | 16 | | TestEnvironment = new TEnvironment(); |
| 126 | 17 | | TestEnvironment.Mode = Mode; |
| 126 | 18 | | } |
| | 19 | |
|
| | 20 | | public override void StartTestRecording() |
| | 21 | | { |
| 4264 | 22 | | base.StartTestRecording(); |
| 3692 | 23 | | TestEnvironment.SetRecording(Recording); |
| 3692 | 24 | | } |
| | 25 | |
|
| 19185 | 26 | | public TEnvironment TestEnvironment { get; } |
| | 27 | | } |
| | 28 | | } |