diff --git a/src/Dns/Dns.Test/ScenarioTests/DnsTestRunner.cs b/src/Dns/Dns.Test/ScenarioTests/DnsTestRunner.cs new file mode 100644 index 000000000000..63ed81a38391 --- /dev/null +++ b/src/Dns/Dns.Test/ScenarioTests/DnsTestRunner.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Xunit.Abstractions; +using Microsoft.Azure.Commands.TestFx; + +namespace Microsoft.Azure.Commands.ScenarioTest.DnsTests +{ + public class DnsTestRunner + { + protected readonly ITestRunner TestRunner; + + protected DnsTestRunner(ITestOutputHelper output) + { + TestRunner = TestManager.CreateInstance(output) + .WithNewPsScriptFilename($"{GetType().Name}.ps1") + .WithProjectSubfolderForTests("ScenarioTests") + .WithCommonPsScripts(new[] + { + @"Common.ps1", + @"../AzureRM.Resources.ps1" + }) + .WithNewRmModules(helper => new[] + { + helper.RMProfileModule, + helper.GetRMModulePath("Az.Dns.psd1"), + helper.GetRMModulePath("Az.Network.psd1") + }) + .WithNewRecordMatcherArguments( + userAgentsToIgnore: new Dictionary + { + {"Microsoft.Azure.Management.Resources.ResourceManagementClient", "2016-02-01"} + }, + resourceProviders: new Dictionary + { + {"Microsoft.Resources", null}, + {"Microsoft.Features", null}, + {"Microsoft.Authorization", null}, + {"Microsoft.Network", null} + } + ) + .Build(); + } + } +} diff --git a/src/Dns/Dns.Test/ScenarioTests/DnsTestsBase.cs b/src/Dns/Dns.Test/ScenarioTests/DnsTestsBase.cs deleted file mode 100644 index d8977e4a62f4..000000000000 --- a/src/Dns/Dns.Test/ScenarioTests/DnsTestsBase.cs +++ /dev/null @@ -1,142 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Management.Dns; -using Microsoft.Azure.Management.Internal.Resources; -using Microsoft.Azure.Management.Network; -using Microsoft.Azure.Test.HttpRecorder; -using Microsoft.Rest.ClientRuntime.Azure.TestFramework; -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; -using TestEnvironmentFactory = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestEnvironmentFactory; -using Microsoft.Azure.ServiceManagement.Common.Models; - -namespace Microsoft.Azure.Commands.ScenarioTest.DnsTests -{ - public class DnsTestsBase : RMTestBase - { - private readonly EnvironmentSetupHelper _helper; - - public ResourceManagementClient ResourceManagementClient { get; private set; } - - public DnsManagementClient DnsClient { get; private set; } - - public NetworkManagementClient NetworkManagementClient { get; private set; } - - public static DnsTestsBase NewInstance => new DnsTestsBase(); - - protected DnsTestsBase() - { - _helper = new EnvironmentSetupHelper(); - } - - protected void SetupManagementClients(MockContext context) - { - ResourceManagementClient = GetResourceManagementClient(context); - DnsClient = GetFeatureClient(context); - NetworkManagementClient = GetNetworkManagementClient(context); - - _helper.SetupManagementClients( - ResourceManagementClient, - DnsClient, - NetworkManagementClient); - } - - - public void RunPowerShellTest(XunitTracingInterceptor logger, params string[] scripts) - { - var sf = new StackTrace().GetFrame(1); - var callingClassType = sf.GetMethod().ReflectedType?.ToString(); - var mockName = sf.GetMethod().Name; - - _helper.TracingInterceptor = logger; - - RunPsTestWorkflow( - () => scripts, - // no custom cleanup - null, - callingClassType, - mockName); - } - - - public void RunPsTestWorkflow( - Func scriptBuilder, - Action cleanup, - string callingClassType, - string mockName) - { - var d = new Dictionary - { - {"Microsoft.Resources", null}, {"Microsoft.Features", null}, {"Microsoft.Authorization", null}, {"Microsoft.Network", null} - }; - var providersToIgnore = new Dictionary - { - {"Microsoft.Azure.Management.Resources.ResourceManagementClient", "2016-02-01"} - }; - HttpMockServer.Matcher = new PermissiveRecordMatcherWithApiExclusion(true, d, providersToIgnore); - HttpMockServer.RecordsDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SessionRecords"); - - using (var context = MockContext.Start(callingClassType, mockName)) - { - - SetupManagementClients(context); - - _helper.SetupEnvironment(AzureModule.AzureResourceManager); - - var callingClassName = callingClassType.Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries).Last(); - - _helper.SetupModules(AzureModule.AzureResourceManager, "ScenarioTests\\Common.ps1", "ScenarioTests\\" + callingClassName + ".ps1", - _helper.RMProfileModule, - _helper.GetRMModulePath("AzureRM.Dns.psd1"), - _helper.GetRMModulePath("AzureRM.Network.psd1"), - "AzureRM.Resources.ps1"); - - try - { - var psScripts = scriptBuilder?.Invoke(); - if (psScripts != null) - { - _helper.RunPowerShellTest(psScripts); - } - } - finally - { - cleanup?.Invoke(); - } - } - } - - protected ResourceManagementClient GetResourceManagementClient(MockContext context) - { - return context.GetServiceClient(TestEnvironmentFactory.GetTestEnvironment()); - } - - protected NetworkManagementClient GetNetworkManagementClient(MockContext context) - { - return context.GetServiceClient(TestEnvironmentFactory.GetTestEnvironment()); - } - - private static DnsManagementClient GetFeatureClient(MockContext context) - { - return context.GetServiceClient(TestEnvironmentFactory.GetTestEnvironment()); - } - } -} diff --git a/src/Dns/Dns.Test/ScenarioTests/RecordsTests.cs b/src/Dns/Dns.Test/ScenarioTests/RecordsTests.cs index 1dc29d052e56..8d863427fb96 100644 --- a/src/Dns/Dns.Test/ScenarioTests/RecordsTests.cs +++ b/src/Dns/Dns.Test/ScenarioTests/RecordsTests.cs @@ -17,164 +17,157 @@ namespace Microsoft.Azure.Commands.ScenarioTest.DnsTests { - using ServiceManagement.Common.Models; - using System.Diagnostics; - - public class RecordsTests : DnsTestsBase - { - public XunitTracingInterceptor _logger; - - public RecordsTests(Xunit.Abstractions.ITestOutputHelper output) + public class RecordsTests : DnsTestRunner + { + public RecordsTests(Xunit.Abstractions.ITestOutputHelper output) : base(output) { - _logger = new XunitTracingInterceptor(output); - XunitTracingInterceptor.AddToContext(_logger); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestAliasRecordSet() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-AliasRecordSet"); + TestRunner.RunTestScript("Test-AliasRecordSet"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetCrud() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetCrud"); + TestRunner.RunTestScript("Test-RecordSetCrud"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetCrudTrimsDotFromZoneName() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetCrudTrimsDotFromZoneName"); + TestRunner.RunTestScript("Test-RecordSetCrudTrimsDotFromZoneName"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetCrudWithPiping() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetCrudWithPiping"); + TestRunner.RunTestScript("Test-RecordSetCrudWithPiping"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetCrudWithPipingTrimsDotFromZoneName() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetCrudWithPipingTrimsDotFromZoneName"); + TestRunner.RunTestScript("Test-RecordSetCrudWithPipingTrimsDotFromZoneName"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetA() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetA"); + TestRunner.RunTestScript("Test-RecordSetA"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetANonEmpty() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetANonEmpty"); + TestRunner.RunTestScript("Test-RecordSetANonEmpty"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetAAAA() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetAAAA"); + TestRunner.RunTestScript("Test-RecordSetAAAA"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetAAAANonEmpty() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetAAAANonEmpty"); + TestRunner.RunTestScript("Test-RecordSetAAAANonEmpty"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetCNAME() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetCNAME"); + TestRunner.RunTestScript("Test-RecordSetCNAME"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetCNAMENonEmpty() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetCNAMENonEmpty"); + TestRunner.RunTestScript("Test-RecordSetCNAMENonEmpty"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetMX() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetMX"); + TestRunner.RunTestScript("Test-RecordSetMX"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetMXNonEmpty() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetMXNonEmpty"); + TestRunner.RunTestScript("Test-RecordSetMXNonEmpty"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetCAA() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetCAA"); + TestRunner.RunTestScript("Test-RecordSetCAA"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetCAANonEmpty() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetCAANonEmpty"); + TestRunner.RunTestScript("Test-RecordSetCAANonEmpty"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetNS() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetNS"); + TestRunner.RunTestScript("Test-RecordSetNS"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetNSNonEmpty() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetNSNonEmpty"); + TestRunner.RunTestScript("Test-RecordSetNSNonEmpty"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetTXT() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetTXT"); + TestRunner.RunTestScript("Test-RecordSetTXT"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetTXTNonEmpty() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetTXTNonEmpty"); + TestRunner.RunTestScript("Test-RecordSetTXTNonEmpty"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetTXTLengthValidation() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetTXTLengthValidation"); + TestRunner.RunTestScript("Test-RecordSetTXTLengthValidation"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetTXTLegacyLengthValidation() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetTXTLegacyLengthValidation"); + TestRunner.RunTestScript("Test-RecordSetTXTLegacyLengthValidation"); } @@ -182,90 +175,90 @@ public void TestRecordSetTXTLegacyLengthValidation() [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetSRV() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetSRV"); + TestRunner.RunTestScript("Test-RecordSetSRV"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetSRVNonEmpty() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetSRVNonEmpty"); + TestRunner.RunTestScript("Test-RecordSetSRVNonEmpty"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetSOA() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetSOA"); + TestRunner.RunTestScript("Test-RecordSetSOA"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetPTR() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetPTR"); + TestRunner.RunTestScript("Test-RecordSetPTR"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetPTRNonEmpty() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetPTRNonEmpty"); + TestRunner.RunTestScript("Test-RecordSetPTRNonEmpty"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetnewAlreadyExists() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetnewAlreadyExists"); + TestRunner.RunTestScript("Test-RecordSetnewAlreadyExists"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetAddRecordTypeMismatch() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetAddRecordTypeMismatch"); + TestRunner.RunTestScript("Test-RecordSetAddRecordTypeMismatch"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetAddTwoCnames() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetAddTwoCnames"); + TestRunner.RunTestScript("Test-RecordSetAddTwoCnames"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetRemoveRecordTypeMismatch() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetRemoveRecordTypeMismatch"); + TestRunner.RunTestScript("Test-RecordSetRemoveRecordTypeMismatch"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetEtagMismatch() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetEtagMismatch"); + TestRunner.RunTestScript("Test-RecordSetEtagMismatch"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetGet() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetGet"); + TestRunner.RunTestScript("Test-RecordSetGet"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetEndsWithZoneName() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetEndsWithZoneName"); + TestRunner.RunTestScript("Test-RecordSetEndsWithZoneName"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestRecordSetNewRecordNoName() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-RecordSetNewRecordNoName"); + TestRunner.RunTestScript("Test-RecordSetNewRecordNoName"); } } } diff --git a/src/Dns/Dns.Test/ScenarioTests/ZoneTests.cs b/src/Dns/Dns.Test/ScenarioTests/ZoneTests.cs index be1aa15541d9..32f21612744f 100644 --- a/src/Dns/Dns.Test/ScenarioTests/ZoneTests.cs +++ b/src/Dns/Dns.Test/ScenarioTests/ZoneTests.cs @@ -12,146 +12,141 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using Microsoft.Azure.ServiceManagement.Common.Models; using Microsoft.WindowsAzure.Commands.ScenarioTest; using Xunit; namespace Microsoft.Azure.Commands.ScenarioTest.DnsTests { - public class ZoneTests : DnsTestsBase + public class ZoneTests : DnsTestRunner { - public XunitTracingInterceptor _logger; - - public ZoneTests(Xunit.Abstractions.ITestOutputHelper output) + public ZoneTests(Xunit.Abstractions.ITestOutputHelper output) : base(output) { - _logger = new XunitTracingInterceptor(output); - XunitTracingInterceptor.AddToContext(_logger); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestZoneCrud() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-ZoneCrud"); + TestRunner.RunTestScript("Test-ZoneCrud"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestZoneWithDelegation() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-ZoneWithDelegation"); + TestRunner.RunTestScript("Test-ZoneWithDelegation"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestPrivateZoneCrud() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-PrivateZoneCrud"); + TestRunner.RunTestScript("Test-PrivateZoneCrud"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestPrivateZoneCrudRegistrationVirtualNetwork() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-PrivateZoneCrudRegistrationVnet"); + TestRunner.RunTestScript("Test-PrivateZoneCrudRegistrationVnet"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestPrivateZoneCrudResolutionVirtualNetwork() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-PrivateZoneCrudResolutionVnet"); + TestRunner.RunTestScript("Test-PrivateZoneCrudResolutionVnet"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestPrivateZoneCrudByVirtualNetworkIds() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-PrivateZoneCrudByVirtualNetworkIds"); + TestRunner.RunTestScript("Test-PrivateZoneCrudByVirtualNetworkIds"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestPrivateZoneCrudByVirtualNetworkObjects() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-PrivateZoneCrudByVirtualNetworkObjects"); + TestRunner.RunTestScript("Test-PrivateZoneCrudByVirtualNetworkObjects"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestZoneCrudTrimsDot() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-ZoneCrudTrimsDot"); + TestRunner.RunTestScript("Test-ZoneCrudTrimsDot"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestZoneCrudWithPiping() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-ZoneCrudWithPiping"); + TestRunner.RunTestScript("Test-ZoneCrudWithPiping"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestZoneCrudWithPipingTrimsDot() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-ZoneCrudWithPipingTrimsDot"); + TestRunner.RunTestScript("Test-ZoneCrudWithPipingTrimsDot"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestZoneList() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-ZoneList"); + TestRunner.RunTestScript("Test-ZoneList"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestZoneListSubscription() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-ZoneListSubscription"); + TestRunner.RunTestScript("Test-ZoneListSubscription"); } [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestZoneNewAlreadyExists() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-ZoneNewAlreadyExists"); + TestRunner.RunTestScript("Test-ZoneNewAlreadyExists"); } [Fact()] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestZoneSetEtagMismatch() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-ZoneSetEtagMismatch"); + TestRunner.RunTestScript("Test-ZoneSetEtagMismatch"); } [Fact()] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestZoneSetNotFound() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-ZoneSetNotFound"); + TestRunner.RunTestScript("Test-ZoneSetNotFound"); } [Fact()] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestZoneRemoveEtagMismatch() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-ZoneRemoveEtagMismatch"); + TestRunner.RunTestScript("Test-ZoneRemoveEtagMismatch"); } [Fact()] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestZoneRemoveNotFound() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-ZoneRemoveNonExisting"); + TestRunner.RunTestScript("Test-ZoneRemoveNonExisting"); } [Fact()] [Trait(Category.AcceptanceType, Category.CheckIn)] public void TestZoneAddRemoveRecordSet() { - DnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-AddRemoveRecordSet"); + TestRunner.RunTestScript("Test-AddRemoveRecordSet"); } } }