|
15 | 15 | namespace Microsoft.Azure.Commands.TrafficManager.Test.ScenarioTests |
16 | 16 | { |
17 | 17 | using Microsoft.WindowsAzure.Commands.ScenarioTest; |
18 | | - using ServiceManagement.Common.Models; |
19 | 18 | using Xunit; |
20 | 19 | using Xunit.Abstractions; |
21 | | - public class EndpointTests |
| 20 | + public class EndpointTests : TrafficManagerTestRunner |
22 | 21 | { |
23 | | - public XunitTracingInterceptor _logger; |
24 | | - |
25 | | - public EndpointTests(ITestOutputHelper output) |
| 22 | + public EndpointTests(ITestOutputHelper output) : base(output) |
26 | 23 | { |
27 | | - _logger = new XunitTracingInterceptor(output); |
28 | | - XunitTracingInterceptor.AddToContext(_logger); |
29 | 24 | } |
30 | 25 |
|
31 | 26 | [Fact] |
32 | 27 | [Trait(Category.AcceptanceType, Category.CheckIn)] |
33 | 28 | public void TestAddEndpoint() |
34 | 29 | { |
35 | | - TestController.NewInstance.RunPowerShellTest(_logger, "Test-AddEndpoint"); |
| 30 | + TestRunner.RunTestScript("Test-AddEndpoint"); |
36 | 31 | } |
37 | 32 |
|
38 | 33 | [Fact] |
39 | 34 | [Trait(Category.AcceptanceType, Category.CheckIn)] |
40 | 35 | public void TestDeleteEndpoint() |
41 | 36 | { |
42 | | - TestController.NewInstance.RunPowerShellTest(_logger, "Test-DeleteEndpoint"); |
| 37 | + TestRunner.RunTestScript("Test-DeleteEndpoint"); |
43 | 38 | } |
44 | 39 |
|
45 | 40 | [Fact] |
46 | 41 | [Trait(Category.AcceptanceType, Category.CheckIn)] |
47 | 42 | public void TestEndpointCrud() |
48 | 43 | { |
49 | | - TestController.NewInstance.RunPowerShellTest(_logger, "Test-EndpointCrud"); |
| 44 | + TestRunner.RunTestScript("Test-EndpointCrud"); |
50 | 45 | } |
51 | 46 |
|
52 | 47 | [Fact] |
53 | 48 | [Trait(Category.AcceptanceType, Category.CheckIn)] |
54 | 49 | public void TestEndpointCrudGeo() |
55 | 50 | { |
56 | | - TestController.NewInstance.RunPowerShellTest(_logger, "Test-EndpointCrudGeo"); |
| 51 | + TestRunner.RunTestScript("Test-EndpointCrudGeo"); |
57 | 52 | } |
58 | 53 |
|
59 | 54 | [Fact] |
60 | 55 | [Trait(Category.AcceptanceType, Category.CheckIn)] |
61 | 56 | public void TestEndpointCrudPiping() |
62 | 57 | { |
63 | | - TestController.NewInstance.RunPowerShellTest(_logger, "Test-EndpointCrudPiping"); |
| 58 | + TestRunner.RunTestScript("Test-EndpointCrudPiping"); |
64 | 59 | } |
65 | 60 |
|
66 | 61 | [Fact] |
67 | 62 | [Trait(Category.AcceptanceType, Category.CheckIn)] |
68 | 63 | public void TestCreateExistingEndpoint() |
69 | 64 | { |
70 | | - TestController.NewInstance.RunPowerShellTest(_logger, "Test-CreateExistingEndpoint"); |
| 65 | + TestRunner.RunTestScript("Test-CreateExistingEndpoint"); |
71 | 66 | } |
72 | 67 |
|
73 | 68 | [Fact] |
74 | 69 | [Trait(Category.AcceptanceType, Category.CheckIn)] |
75 | 70 | public void TestCreateExistingEndpointFromNonExistingProfile() |
76 | 71 | { |
77 | | - TestController.NewInstance.RunPowerShellTest(_logger, "Test-CreateExistingEndpointFromNonExistingProfile"); |
| 72 | + TestRunner.RunTestScript("Test-CreateExistingEndpointFromNonExistingProfile"); |
78 | 73 | } |
79 | 74 |
|
80 | 75 | [Fact] |
81 | 76 | [Trait(Category.AcceptanceType, Category.CheckIn)] |
82 | 77 | public void TestRemoveExistingEndpointFromNonExistingProfile() |
83 | 78 | { |
84 | | - TestController.NewInstance.RunPowerShellTest(_logger, "Test-RemoveExistingEndpointFromNonExistingProfile"); |
| 79 | + TestRunner.RunTestScript("Test-RemoveExistingEndpointFromNonExistingProfile"); |
85 | 80 | } |
86 | 81 |
|
87 | 82 | [Fact] |
88 | 83 | [Trait(Category.AcceptanceType, Category.CheckIn)] |
89 | 84 | public void TestGetExistingEndpointFromNonExistingProfile() |
90 | 85 | { |
91 | | - TestController.NewInstance.RunPowerShellTest(_logger, "Test-GetExistingEndpointFromNonExistingProfile"); |
| 86 | + TestRunner.RunTestScript("Test-GetExistingEndpointFromNonExistingProfile"); |
92 | 87 | } |
93 | 88 |
|
94 | 89 | [Fact] |
95 | 90 | [Trait(Category.AcceptanceType, Category.CheckIn)] |
96 | 91 | public void TestRemoveNonExistingEndpointFromProfile() |
97 | 92 | { |
98 | | - TestController.NewInstance.RunPowerShellTest(_logger, "Test-RemoveNonExistingEndpointFromProfile"); |
| 93 | + TestRunner.RunTestScript("Test-RemoveNonExistingEndpointFromProfile"); |
99 | 94 | } |
100 | 95 |
|
101 | 96 | [Fact] |
102 | 97 | [Trait(Category.AcceptanceType, Category.CheckIn)] |
103 | 98 | public void TestEnableEndpoint() |
104 | 99 | { |
105 | | - TestController.NewInstance.RunPowerShellTest(_logger, "Test-EnableEndpoint"); |
| 100 | + TestRunner.RunTestScript("Test-EnableEndpoint"); |
106 | 101 | } |
107 | 102 |
|
108 | 103 | [Fact] |
109 | 104 | [Trait(Category.AcceptanceType, Category.CheckIn)] |
110 | 105 | public void TestDisableEndpoint() |
111 | 106 | { |
112 | | - TestController.NewInstance.RunPowerShellTest(_logger, "Test-DisableEndpoint"); |
| 107 | + TestRunner.RunTestScript("Test-DisableEndpoint"); |
113 | 108 | } |
114 | 109 |
|
115 | 110 | [Fact] |
116 | 111 | [Trait(Category.AcceptanceType, Category.CheckIn)] |
117 | 112 | public void TestEnableEndpointUsingPiping() |
118 | 113 | { |
119 | | - TestController.NewInstance.RunPowerShellTest(_logger, "Test-EnableEndpointUsingPiping"); |
| 114 | + TestRunner.RunTestScript("Test-EnableEndpointUsingPiping"); |
120 | 115 | } |
121 | 116 |
|
122 | 117 | [Fact] |
123 | 118 | [Trait(Category.AcceptanceType, Category.CheckIn)] |
124 | 119 | public void TestEnableEndpointUsingPipingFromGetProfile() |
125 | 120 | { |
126 | | - TestController.NewInstance.RunPowerShellTest(_logger, "Test-EnableEndpointUsingPipingFromGetProfile"); |
| 121 | + TestRunner.RunTestScript("Test-EnableEndpointUsingPipingFromGetProfile"); |
127 | 122 | } |
128 | 123 |
|
129 | 124 | [Fact] |
130 | 125 | [Trait(Category.AcceptanceType, Category.CheckIn)] |
131 | 126 | public void TestDisableEndpointUsingPiping() |
132 | 127 | { |
133 | | - TestController.NewInstance.RunPowerShellTest(_logger, "Test-DisableEndpointUsingPiping"); |
| 128 | + TestRunner.RunTestScript("Test-DisableEndpointUsingPiping"); |
134 | 129 | } |
135 | 130 |
|
136 | 131 | [Fact] |
137 | 132 | [Trait(Category.AcceptanceType, Category.CheckIn)] |
138 | 133 | public void TestEnableNonExistingEndpoint() |
139 | 134 | { |
140 | | - TestController.NewInstance.RunPowerShellTest(_logger, "Test-EnableNonExistingEndpoint"); |
| 135 | + TestRunner.RunTestScript("Test-EnableNonExistingEndpoint"); |
141 | 136 | } |
142 | 137 |
|
143 | 138 | [Fact] |
144 | 139 | [Trait(Category.AcceptanceType, Category.CheckIn)] |
145 | 140 | public void TestDisableNonExistingEndpoint() |
146 | 141 | { |
147 | | - TestController.NewInstance.RunPowerShellTest(_logger, "Test-DisableNonExistingEndpoint"); |
| 142 | + TestRunner.RunTestScript("Test-DisableNonExistingEndpoint"); |
148 | 143 | } |
149 | 144 |
|
150 | 145 | [Fact] |
151 | 146 | [Trait(Category.AcceptanceType, Category.CheckIn)] |
152 | 147 | public void TestEndpointTypeCaseInsensitive() |
153 | 148 | { |
154 | | - TestController.NewInstance.RunPowerShellTest(_logger, "Test-EndpointTypeCaseInsensitive"); |
| 149 | + TestRunner.RunTestScript("Test-EndpointTypeCaseInsensitive"); |
155 | 150 | } |
156 | 151 |
|
157 | 152 | [Fact] |
158 | 153 | [Trait(Category.AcceptanceType, Category.CheckIn)] |
159 | 154 | public void TestPipeEndpointFromGetEndpoint() |
160 | 155 | { |
161 | | - TestController.NewInstance.RunPowerShellTest(_logger, "Test-PipeEndpointFromGetEndpoint"); |
| 156 | + TestRunner.RunTestScript("Test-PipeEndpointFromGetEndpoint"); |
162 | 157 | } |
163 | 158 |
|
164 | 159 | [Fact] |
165 | 160 | [Trait(Category.AcceptanceType, Category.CheckIn)] |
166 | 161 | public void TestPipeEndpointFromGetProfile() |
167 | 162 | { |
168 | | - TestController.NewInstance.RunPowerShellTest(_logger, "Test-PipeEndpointFromGetProfile"); |
| 163 | + TestRunner.RunTestScript("Test-PipeEndpointFromGetProfile"); |
169 | 164 | } |
170 | 165 |
|
171 | 166 | [Fact] |
172 | 167 | [Trait(Category.AcceptanceType, Category.CheckIn)] |
173 | 168 | public void TestAddAndRemoveCustomHeadersFromEndpoint() |
174 | 169 | { |
175 | | - TestController.NewInstance.RunPowerShellTest(_logger, "Test-AddAndRemoveCustomHeadersFromEndpoint"); |
| 170 | + TestRunner.RunTestScript("Test-AddAndRemoveCustomHeadersFromEndpoint"); |
176 | 171 | } |
177 | 172 |
|
178 | 173 | // This scenario is not supported with current API specs. Commenting this test. |
|
0 commit comments