|
18 | 18 | using Microsoft.Azure.ServiceManagemenet.Common.Models;
|
19 | 19 | using Microsoft.Rest.ClientRuntime.Azure.TestFramework;
|
20 | 20 | using Microsoft.WindowsAzure.Commands.ScenarioTest;
|
21 |
| -using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; |
22 | 21 | using Xunit;
|
23 | 22 | using Xunit.Abstractions;
|
24 | 23 |
|
25 | 24 | namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
|
26 | 25 | {
|
27 |
| - public class ActiveDirectoryTests : RMTestBase |
| 26 | + public class ActiveDirectoryTests: TestManagerBuilder |
28 | 27 | {
|
29 | 28 | XunitTracingInterceptor interceptor { get; set; }
|
30 | 29 |
|
31 |
| - public ActiveDirectoryTests(ITestOutputHelper output) |
| 30 | + public ActiveDirectoryTests(ITestOutputHelper output) : base(output) |
32 | 31 | {
|
33 | 32 | interceptor = new XunitTracingInterceptor(output);
|
34 | 33 | XunitTracingInterceptor.AddToContext(interceptor);
|
@@ -88,7 +87,8 @@ public void TestGetADGroupWithSearchString()
|
88 | 87 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
89 | 88 | public void TestGetADGroupWithBadSearchString()
|
90 | 89 | {
|
91 |
| - ResourcesController.NewInstance.RunPsTest(interceptor, "Test-GetADGroupWithBadSearchString"); |
| 90 | + //ResourcesController.NewInstance.RunPsTest("Test-GetADGroupWithBadSearchString"); |
| 91 | + TestManager.RunTestScript("Test-GetADGroupWithBadSearchString"); |
92 | 92 | }
|
93 | 93 |
|
94 | 94 | [Fact]
|
@@ -145,7 +145,7 @@ public void TestGetADGroupSecurityEnabled()
|
145 | 145 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
146 | 146 | public void TestGetADGroupWithBadObjectId()
|
147 | 147 | {
|
148 |
| - ResourcesController.NewInstance.RunPsTest(interceptor, "Test-GetADGroupWithBadObjectId"); |
| 148 | + TestManager.RunTestScript("Test-GetADGroupWithBadObjectId"); |
149 | 149 | }
|
150 | 150 |
|
151 | 151 | [Fact]
|
@@ -214,7 +214,7 @@ public void TestGetADGroupMemberWithGroupObjectId()
|
214 | 214 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
215 | 215 | public void TestGetADGroupMemberWithBadGroupObjectId()
|
216 | 216 | {
|
217 |
| - ResourcesController.NewInstance.RunPsTest(interceptor, "Test-GetADGroupMemberWithBadGroupObjectId"); |
| 217 | + TestManager.RunTestScript("Test-GetADGroupMemberWithBadGroupObjectId"); |
218 | 218 | }
|
219 | 219 |
|
220 | 220 | [Fact]
|
@@ -299,7 +299,7 @@ public void TestGetADServicePrincipalWithObjectId()
|
299 | 299 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
300 | 300 | public void TestGetADServicePrincipalWithBadObjectId()
|
301 | 301 | {
|
302 |
| - ResourcesController.NewInstance.RunPsTest(interceptor, "Test-GetADServicePrincipalWithBadObjectId"); |
| 302 | + TestManager.RunTestScript("Test-GetADServicePrincipalWithBadObjectId"); |
303 | 303 | }
|
304 | 304 |
|
305 | 305 | [Fact]
|
@@ -359,7 +359,7 @@ public void TestGetADServicePrincipalWithSPN()
|
359 | 359 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
360 | 360 | public void TestGetADServicePrincipalWithBadSPN()
|
361 | 361 | {
|
362 |
| - ResourcesController.NewInstance.RunPsTest(interceptor, "Test-GetADServicePrincipalWithBadSPN"); |
| 362 | + TestManager.RunTestScript("Test-GetADServicePrincipalWithBadSPN"); |
363 | 363 | }
|
364 | 364 |
|
365 | 365 | [Fact]
|
@@ -394,7 +394,7 @@ public void TestGetADServicePrincipalWithSearchString()
|
394 | 394 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
395 | 395 | public void TestGetADServicePrincipalWithBadSearchString()
|
396 | 396 | {
|
397 |
| - ResourcesController.NewInstance.RunPsTest(interceptor, "Test-GetADServicePrincipalWithBadSearchString"); |
| 397 | + TestManager.RunTestScript("Test-GetADServicePrincipalWithBadSearchString"); |
398 | 398 | }
|
399 | 399 |
|
400 | 400 | [Fact]
|
@@ -476,7 +476,7 @@ public void TestGetADUserWithMail()
|
476 | 476 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
477 | 477 | public void TestGetADUserWithBadObjectId()
|
478 | 478 | {
|
479 |
| - ResourcesController.NewInstance.RunPsTest(interceptor, "Test-GetADUserWithBadObjectId"); |
| 479 | + TestManager.RunTestScript("Test-GetADUserWithBadObjectId"); |
480 | 480 | }
|
481 | 481 |
|
482 | 482 | [Fact]
|
@@ -533,14 +533,14 @@ public void TestGetADUserWithUPN()
|
533 | 533 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
534 | 534 | public void TestGetADUserWithFPOUPN()
|
535 | 535 | {
|
536 |
| - ResourcesController.NewInstance.RunPsTest(interceptor, "Test-GetADUserWithFPOUPN"); |
| 536 | + TestManager.RunTestScript("Test-GetADUserWithFPOUPN"); |
537 | 537 | }
|
538 | 538 |
|
539 | 539 | [Fact]
|
540 | 540 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
541 | 541 | public void TestGetADUserWithBadUPN()
|
542 | 542 | {
|
543 |
| - ResourcesController.NewInstance.RunPsTest(interceptor, "Test-GetADUserWithBadUPN"); |
| 543 | + TestManager.RunTestScript("Test-GetADUserWithBadUPN"); |
544 | 544 | }
|
545 | 545 |
|
546 | 546 | [Fact]
|
@@ -572,49 +572,49 @@ public void TestGetADUserWithSearchString()
|
572 | 572 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
573 | 573 | public void TestGetADUserWithBadSearchString()
|
574 | 574 | {
|
575 |
| - ResourcesController.NewInstance.RunPsTest(interceptor, "Test-GetADUserWithBadSearchString"); |
| 575 | + TestManager.RunTestScript("Test-GetADUserWithBadSearchString"); |
576 | 576 | }
|
577 | 577 |
|
578 | 578 | [Fact]
|
579 | 579 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
580 | 580 | public void TestNewADApplication()
|
581 | 581 | {
|
582 |
| - ResourcesController.NewInstance.RunPsTest(interceptor, "Test-NewADApplication"); |
| 582 | + TestManager.RunTestScript("Test-NewADApplication"); |
583 | 583 | }
|
584 | 584 |
|
585 | 585 | [Fact]
|
586 | 586 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
587 | 587 | public void TestNewADServicePrincipalWithoutApp()
|
588 | 588 | {
|
589 |
| - ResourcesController.NewInstance.RunPsTest(interceptor, "Test-NewADServicePrincipalWithoutApp"); |
| 589 | + TestManager.RunTestScript("Test-NewADServicePrincipalWithoutApp"); |
590 | 590 | }
|
591 | 591 |
|
592 | 592 | [Fact]
|
593 | 593 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
594 | 594 | public void TestNewADServicePrincipalWithReaderRole()
|
595 | 595 | {
|
596 |
| - ResourcesController.NewInstance.RunPsTest(interceptor, "Test-NewADServicePrincipalWithReaderRole"); |
| 596 | + TestManager.RunTestScript("Test-NewADServicePrincipalWithReaderRole"); |
597 | 597 | }
|
598 | 598 |
|
599 | 599 | [Fact]
|
600 | 600 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
601 | 601 | public void TestNewADServicePrincipalWithCustomScope()
|
602 | 602 | {
|
603 |
| - ResourcesController.NewInstance.RunPsTest(interceptor, "Test-NewADServicePrincipalWithCustomScope"); |
| 603 | + TestManager.RunTestScript("Test-NewADServicePrincipalWithCustomScope"); |
604 | 604 | }
|
605 | 605 |
|
606 | 606 | [Fact(Skip = "Not working in playback.")]
|
607 | 607 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
608 | 608 | public void TestCreateDeleteAppPasswordCredentials()
|
609 | 609 | {
|
610 |
| - ResourcesController.NewInstance.RunPsTest(interceptor, "Test-CreateDeleteAppPasswordCredentials"); |
| 610 | + TestManager.RunTestScript("Test-CreateDeleteAppPasswordCredentials"); |
611 | 611 | }
|
612 | 612 |
|
613 | 613 | [Fact(Skip = "Not working in playback.")]
|
614 | 614 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
615 | 615 | public void TestCreateDeleteSpPasswordCredentials()
|
616 | 616 | {
|
617 |
| - ResourcesController.NewInstance.RunPsTest(interceptor, "Test-CreateDeleteSpPasswordCredentials"); |
| 617 | + TestManager.RunTestScript("Test-CreateDeleteSpPasswordCredentials"); |
618 | 618 | }
|
619 | 619 |
|
620 | 620 | [Fact]
|
|
0 commit comments