Skip to content

Commit e6743bf

Browse files
authored
Merge pull request Azure#7314 from vladimir-shcherbakov/test-controller
Test controller as nuget package
2 parents f44f445 + da1b731 commit e6743bf

38 files changed

+8833
-8765
lines changed

src/ResourceManager/Profile/Commands.Profile.Test/ArgumentCompleterTests.cs

+7-16
Original file line numberDiff line numberDiff line change
@@ -12,48 +12,39 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.Azure.Commands.ResourceManager.Common;
16-
using Microsoft.Azure.Commands.Resources.Test.ScenarioTests;
17-
using Microsoft.Azure.Commands.ScenarioTest;
18-
using Microsoft.Azure.ServiceManagement.Common.Models;
15+
using Microsoft.Azure.Commands.TestFx;
1916
using Microsoft.WindowsAzure.Commands.ScenarioTest;
20-
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
2117
using Xunit;
2218
using Xunit.Abstractions;
2319

2420
namespace Microsoft.Azure.Commands.Profile.Test
2521
{
26-
public class ArgumentCompleterTests : RMTestBase
22+
public class ArgumentCompleterTests : TestRunnerBase
2723
{
28-
private XunitTracingInterceptor xunitLogger;
29-
30-
public ArgumentCompleterTests(ITestOutputHelper output)
24+
public ArgumentCompleterTests(ITestOutputHelper output)
25+
: base(output)
3126
{
32-
TestExecutionHelpers.SetUpSessionAndProfile();
33-
ResourceManagerProfileProvider.InitializeResourceManagerProfile(true);
34-
35-
xunitLogger = new XunitTracingInterceptor(output);
3627
}
3728

3829
[Fact(Skip = "Failure needs investigated. Not returning list of locations.")]
3930
[Trait(Category.AcceptanceType, Category.CheckIn)]
4031
public void TestLocationCompleter()
4132
{
42-
ProfileController.NewInstance.RunPsTest(xunitLogger, "72f988bf-86f1-41af-91ab-2d7cd011db47", "Test-LocationCompleter");
33+
TestRunner.RunTestScript("Test-LocationCompleter");
4334
}
4435

4536
[Fact(Skip = "Failure needs investigated. Cannot bind argument to parameter 'DifferenceObject' because it is null.")]
4637
[Trait(Category.AcceptanceType, Category.CheckIn)]
4738
public void TestResourceGroupCompleter()
4839
{
49-
ProfileController.NewInstance.RunPsTest(xunitLogger, "72f988bf-86f1-41af-91ab-2d7cd011db47", "Test-ResourceGroupCompleter");
40+
TestRunner.RunTestScript("Test-ResourceGroupCompleter");
5041
}
5142

5243
[Fact(Skip = "AzureRM.Resources.ps1 needs Get-AzureRmResource to be implemented")]
5344
[Trait(Category.AcceptanceType, Category.CheckIn)]
5445
public void TestResourceIdCompleter()
5546
{
56-
ProfileController.NewInstance.RunPsTest(xunitLogger, "72f988bf-86f1-41af-91ab-2d7cd011db47", "Test-ResourceIdCompleter");
47+
TestRunner.RunTestScript("Test-ResourceIdCompleter");
5748
}
5849
}
5950
}

src/ResourceManager/Profile/Commands.Profile.Test/DefaultCmdletTests.cs

+4-11
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,27 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Commands.ResourceManager.Common;
16-
using Microsoft.Azure.Commands.Resources.Test.ScenarioTests;
1716
using Microsoft.Azure.Commands.ScenarioTest;
1817
using Microsoft.Azure.ServiceManagement.Common.Models;
1918
using Microsoft.WindowsAzure.Commands.ScenarioTest;
20-
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
21-
using System.Threading;
19+
using Microsoft.Azure.Commands.TestFx;
2220
using Xunit;
2321
using Xunit.Abstractions;
2422

2523
namespace Microsoft.Azure.Commands.Profile.Test
2624
{
27-
public class DefaultCmdletTests : RMTestBase
25+
public class DefaultCmdletTests : TestRunnerBase
2826
{
29-
private XunitTracingInterceptor xunitLogger;
30-
3127
public DefaultCmdletTests(ITestOutputHelper output)
28+
: base(output)
3229
{
33-
TestExecutionHelpers.SetUpSessionAndProfile();
34-
ResourceManagerProfileProvider.InitializeResourceManagerProfile(true);
35-
36-
xunitLogger = new XunitTracingInterceptor(output);
3730
}
3831

3932
[Fact]
4033
[Trait(Category.AcceptanceType, Category.CheckIn)]
4134
public void DefaultResourceGroup()
4235
{
43-
ProfileController.NewInstance.RunPsTest(xunitLogger, "72f988bf-86f1-41af-91ab-2d7cd011db47", "Test-DefaultResourceGroup");
36+
TestRunner.RunTestScript("Test-DefaultResourceGroup");
4437
}
4538
}
4639
}

src/ResourceManager/Profile/Commands.Profile.Test/ProfileController.cs

-133
This file was deleted.

src/ResourceManager/Profile/Commands.Profile.Test/SessionRecords/Microsoft.Azure.Commands.Profile.Test.ArgumentCompleterTests/TestLocationCompleter.json

+39-39
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)