Skip to content

Commit

Permalink
Edit ServiceBusTestRunner and remove TestController (#18404)
Browse files Browse the repository at this point in the history
* Edit ServiceBusTestRunner and remove TestController

* remove RecordMatcher

* Remove unnecessary module

Co-authored-by: Ziyue Zheng <v-ziyzhe@microsoft.com>
  • Loading branch information
CaptainFanZzz and ziyuezh576 authored Jun 7, 2022
1 parent 2acd0a3 commit 31cb35a
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 225 deletions.
13 changes: 4 additions & 9 deletions src/ServiceBus/ServiceBus.Test/ScenarioTests/NetworkRuleSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,21 @@

namespace Microsoft.Azure.Commands.ServiceBus.Test.ScenarioTests
{
using Microsoft.Azure.Commands.EventHub.Test.ScenarioTests;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
using ServiceManagement.Common.Models;
using Xunit;
using Xunit.Abstractions;
public class NetworkRuleSetTests : RMTestBase
public class NetworkRuleSetTests : ServiceBusTestRunner
{
public XunitTracingInterceptor _logger;

public NetworkRuleSetTests(ITestOutputHelper output)
public NetworkRuleSetTests(ITestOutputHelper output) : base(output)
{
_logger = new XunitTracingInterceptor(output);
XunitTracingInterceptor.AddToContext(_logger);
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void NetworkRuleSetCRUD()
{
ServiceBusController.NewInstance.RunPsTest(_logger, "NetworkRuleSetTests");
TestRunner.RunTestScript("NetworkRuleSetTests");
}
}
}
131 changes: 0 additions & 131 deletions src/ServiceBus/ServiceBus.Test/ScenarioTests/ServiceBusController.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,21 @@

namespace Microsoft.Azure.Commands.ServiceBus.Test.ScenarioTests
{
using Microsoft.Azure.Commands.EventHub.Test.ScenarioTests;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
using ServiceBus;
using ServiceManagement.Common.Models;
using Xunit;
using Xunit.Abstractions;
public class ServiceBusDRConfigurationTests : RMTestBase
public class ServiceBusDRConfigurationTests : ServiceBusTestRunner
{
public XunitTracingInterceptor _logger;

public ServiceBusDRConfigurationTests(ITestOutputHelper output)
public ServiceBusDRConfigurationTests(ITestOutputHelper output) : base(output)
{
_logger = new XunitTracingInterceptor(output);
XunitTracingInterceptor.AddToContext(_logger);
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void ServiceBusDRConfigurationsCURD()
{
ServiceBusController.NewInstance.RunPsTest(_logger, "ServiceBusDRConfigurationTests");
TestRunner.RunTestScript("ServiceBusDRConfigurationTests");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,22 @@

namespace Microsoft.Azure.Commands.ServiceBus.Test.ScenarioTests
{
using Microsoft.Azure.Commands.EventHub.Test.ScenarioTests;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
using ServiceManagement.Common.Models;
using Xunit;
using Xunit.Abstractions;
public class ServiceBusMigrationConfigurationTests : RMTestBase
public class ServiceBusMigrationConfigurationTests : ServiceBusTestRunner
{
public XunitTracingInterceptor _logger;

public ServiceBusMigrationConfigurationTests(ITestOutputHelper output)
public ServiceBusMigrationConfigurationTests(ITestOutputHelper output) : base(output)
{
_logger = new XunitTracingInterceptor(output);
XunitTracingInterceptor.AddToContext(_logger);
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void ServiceBusMigrationConfigurationsCURD()
{
ServiceBusController.NewInstance.RunPsTest(_logger,"ServiceBusMigrationConfigurationTests");
TestRunner.RunTestScript("ServiceBusMigrationConfigurationTests");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,21 @@

namespace Microsoft.Azure.Commands.ServiceBus.Test.ScenarioTests
{
using Microsoft.Azure.Commands.EventHub.Test.ScenarioTests;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
using ServiceManagement.Common.Models;
using Xunit;
using Xunit.Abstractions;
public class ServiceBusPaginationTests : RMTestBase
public class ServiceBusPaginationTests : ServiceBusTestRunner
{
public XunitTracingInterceptor _logger;

public ServiceBusPaginationTests(ITestOutputHelper output)
public ServiceBusPaginationTests(ITestOutputHelper output) : base(output)
{
_logger = new XunitTracingInterceptor(output);
XunitTracingInterceptor.AddToContext(_logger);
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void ServiceBusPaginationTests_CURD()
{
ServiceBusController.NewInstance.RunPsTest(_logger, "ServiceBusPaginationTests");
TestRunner.RunTestScript("ServiceBusPaginationTests");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,28 @@

namespace Microsoft.Azure.Commands.ServiceBus.Test.ScenarioTests
{
using Microsoft.Azure.Commands.EventHub.Test.ScenarioTests;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
using ServiceManagement.Common.Models;
using Xunit;
using Xunit.Abstractions;
public class ServiceBusQueueTests : RMTestBase
public class ServiceBusQueueTests : ServiceBusTestRunner
{
public XunitTracingInterceptor _logger;

public ServiceBusQueueTests(ITestOutputHelper output)
public ServiceBusQueueTests(ITestOutputHelper output) : base(output)
{
_logger = new XunitTracingInterceptor(output);
XunitTracingInterceptor.AddToContext(_logger);
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void ServiceBusQueue_CURD()
{
ServiceBusController.NewInstance.RunPsTest(_logger, "ServiceBusQueueTests");
TestRunner.RunTestScript("ServiceBusQueueTests");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void ServiceBusQueueAuth_CURD()
{
ServiceBusController.NewInstance.RunPsTest(_logger, "ServiceBusQueueAuthTests");
TestRunner.RunTestScript("ServiceBusQueueAuthTests");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,21 @@

namespace Microsoft.Azure.Commands.ServiceBus.Test.ScenarioTests
{
using Microsoft.Azure.Commands.EventHub.Test.ScenarioTests;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
using ServiceManagement.Common.Models;
using Xunit;
using Xunit.Abstractions;
public class ServiceBusRuleTests : RMTestBase
public class ServiceBusRuleTests : ServiceBusTestRunner
{
public XunitTracingInterceptor _logger;

public ServiceBusRuleTests(ITestOutputHelper output)
public ServiceBusRuleTests(ITestOutputHelper output) : base(output)
{
_logger = new XunitTracingInterceptor(output);
XunitTracingInterceptor.AddToContext(_logger);
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void ServiceBusRule_CURD()
{
ServiceBusController.NewInstance.RunPsTest(_logger, "ServiceBusRuleTests");
TestRunner.RunTestScript("ServiceBusRuleTests");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@ namespace Microsoft.Azure.Commands.ServiceBus.Test.ScenarioTests
{
using Microsoft.Azure.Commands.EventHub.Test.ScenarioTests;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
using ServiceManagement.Common.Models;
using Xunit;
using Xunit.Abstractions;
public class ServiceBusServiceTests : ServiceBusTestRunner
{
public ServiceBusServiceTests(ITestOutputHelper output) : base(output)
{

}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,21 @@

namespace Microsoft.Azure.Commands.ServiceBus.Test.ScenarioTests
{
using Microsoft.Azure.Commands.EventHub.Test.ScenarioTests;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
using ServiceManagement.Common.Models;
using Xunit;
using Xunit.Abstractions;
public class ServiceBusSubscriptionTests : RMTestBase
public class ServiceBusSubscriptionTests : ServiceBusTestRunner
{
public XunitTracingInterceptor _logger;

public ServiceBusSubscriptionTests(ITestOutputHelper output)
public ServiceBusSubscriptionTests(ITestOutputHelper output) : base(output)
{
_logger = new XunitTracingInterceptor(output);
XunitTracingInterceptor.AddToContext(_logger);
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void ServiceBusSubscription_CURD()
{
ServiceBusController.NewInstance.RunPsTest(_logger, "ServiceBusSubscriptionTests");
TestRunner.RunTestScript("ServiceBusSubscriptionTests");
}
}
}
Loading

0 comments on commit 31cb35a

Please sign in to comment.