|
14 | 14 |
|
15 | 15 |
|
16 | 16 | using Microsoft.Azure.Commands.Management.CognitiveServices.Test.ScenarioTests;
|
17 |
| -using Microsoft.Azure.Commands.ScenarioTest; |
18 |
| -using Microsoft.Azure.ServiceManagement.Common.Models; |
19 | 17 | using Microsoft.WindowsAzure.Commands.ScenarioTest;
|
20 |
| -using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; |
21 |
| -using System; |
22 | 18 | using Xunit;
|
23 | 19 | using Xunit.Abstractions;
|
24 | 20 |
|
25 | 21 | namespace CognitiveServices.Test.ScenarioTests
|
26 | 22 | {
|
27 |
| - public class CognitiveServicesAccountTests : RMTestBase |
| 23 | + public class CognitiveServicesAccountTests : CognitiveServicesTestRunner |
28 | 24 | {
|
29 |
| - XunitTracingInterceptor traceInterceptor; |
30 |
| - |
31 |
| - public CognitiveServicesAccountTests(ITestOutputHelper output) |
| 25 | + public CognitiveServicesAccountTests(ITestOutputHelper output) : base(output) |
32 | 26 | {
|
33 |
| - this.traceInterceptor = new XunitTracingInterceptor(output); |
34 |
| - XunitTracingInterceptor.AddToContext(this.traceInterceptor); |
35 |
| - TestExecutionHelpers.SetUpSessionAndProfile(); |
36 | 27 | }
|
37 | 28 |
|
38 | 29 | [Fact]
|
39 | 30 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
40 | 31 | public void TestNewAccount()
|
41 | 32 | {
|
42 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-NewAzureRmCognitiveServicesAccount"); |
| 33 | + TestRunner.RunTestScript("Test-NewAzureRmCognitiveServicesAccount"); |
43 | 34 | }
|
44 | 35 |
|
45 | 36 | [Fact]
|
46 | 37 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
47 | 38 | public void TestNewAccountWithCustomDomain()
|
48 | 39 | {
|
49 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-NewAzureRmCognitiveServicesAccountWithCustomDomain"); |
| 40 | + TestRunner.RunTestScript("Test-NewAzureRmCognitiveServicesAccountWithCustomDomain"); |
50 | 41 | }
|
51 | 42 |
|
52 | 43 | [Fact]
|
53 | 44 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
54 | 45 | public void TestNewAccountWithVnet()
|
55 | 46 | {
|
56 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-NewAzureRmCognitiveServicesAccountWithVnet"); |
| 47 | + TestRunner.RunTestScript("Test-NewAzureRmCognitiveServicesAccountWithVnet"); |
57 | 48 | }
|
58 | 49 |
|
59 | 50 | [Fact]
|
60 | 51 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
61 | 52 | public void TestRemoveAccount()
|
62 | 53 | {
|
63 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-RemoveAzureRmCognitiveServicesAccount"); |
| 54 | + TestRunner.RunTestScript("Test-RemoveAzureRmCognitiveServicesAccount"); |
64 | 55 | }
|
65 | 56 |
|
66 | 57 |
|
67 | 58 | [Fact]
|
68 | 59 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
69 | 60 | public void TestGetAccounts()
|
70 | 61 | {
|
71 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-GetAzureCognitiveServiceAccount"); |
| 62 | + TestRunner.RunTestScript("Test-GetAzureCognitiveServiceAccount"); |
72 | 63 | }
|
73 | 64 |
|
74 | 65 | [Fact]
|
75 | 66 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
76 | 67 | public void TestAsyncAccountOperations()
|
77 | 68 | {
|
78 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-AsyncAccountOperations"); |
| 69 | + TestRunner.RunTestScript("Test-AsyncAccountOperations"); |
79 | 70 | }
|
80 | 71 |
|
81 | 72 | [Fact]
|
82 | 73 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
83 | 74 | public void TestSetAccount()
|
84 | 75 | {
|
85 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-SetAzureRmCognitiveServicesAccount"); |
| 76 | + TestRunner.RunTestScript("Test-SetAzureRmCognitiveServicesAccount"); |
86 | 77 | }
|
87 | 78 |
|
88 | 79 | [Fact]
|
89 | 80 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
90 | 81 | public void TestSetAccountWithCustomDomain()
|
91 | 82 | {
|
92 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-SetAzureRmCognitiveServicesAccountWithCustomDomain"); |
| 83 | + TestRunner.RunTestScript("Test-SetAzureRmCognitiveServicesAccountWithCustomDomain"); |
93 | 84 | }
|
94 | 85 |
|
95 | 86 | [Fact]
|
96 | 87 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
97 | 88 | public void TestSetAccountWithVnet()
|
98 | 89 | {
|
99 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-SetAzureRmCognitiveServicesAccountWithVnet"); |
| 90 | + TestRunner.RunTestScript("Test-SetAzureRmCognitiveServicesAccountWithVnet"); |
100 | 91 | }
|
101 | 92 |
|
102 | 93 | [Fact]
|
103 | 94 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
104 | 95 | public void TestNetworkRuleSet()
|
105 | 96 | {
|
106 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-NetworkRuleSet"); |
| 97 | + TestRunner.RunTestScript("Test-NetworkRuleSet"); |
107 | 98 | }
|
108 | 99 |
|
109 | 100 |
|
110 | 101 | [Fact]
|
111 | 102 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
112 | 103 | public void TestNetworkRuleSetDefaultActions()
|
113 | 104 | {
|
114 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-NetworkRuleSetDefaultActions"); |
| 105 | + TestRunner.RunTestScript("Test-NetworkRuleSetDefaultActions"); |
115 | 106 | }
|
116 | 107 |
|
117 | 108 | [Fact]
|
118 | 109 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
119 | 110 | public void TestGetAccountKeys()
|
120 | 111 | {
|
121 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-GetAzureRmCognitiveServicesAccountKey"); |
| 112 | + TestRunner.RunTestScript("Test-GetAzureRmCognitiveServicesAccountKey"); |
122 | 113 | }
|
123 | 114 |
|
124 | 115 | [Fact]
|
125 | 116 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
126 | 117 | public void TestNewAccountKey()
|
127 | 118 | {
|
128 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-NewAzureRmCognitiveServicesAccountKey"); |
| 119 | + TestRunner.RunTestScript("Test-NewAzureRmCognitiveServicesAccountKey"); |
129 | 120 | }
|
130 | 121 |
|
131 | 122 | [Fact]
|
132 | 123 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
133 | 124 | public void TestAccountSkus()
|
134 | 125 | {
|
135 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-GetAzureRmCognitiveServicesAccountSkus"); |
| 126 | + TestRunner.RunTestScript("Test-GetAzureRmCognitiveServicesAccountSkus"); |
136 | 127 | }
|
137 | 128 |
|
138 | 129 | [Fact]
|
139 | 130 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
140 | 131 | public void TestGetAccountType()
|
141 | 132 | {
|
142 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-GetAzureRmCognitiveServicesAccountType"); |
| 133 | + TestRunner.RunTestScript("Test-GetAzureRmCognitiveServicesAccountType"); |
143 | 134 | }
|
144 | 135 |
|
145 | 136 | [Fact]
|
146 | 137 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
147 | 138 | public void TestPipingToGetKey()
|
148 | 139 | {
|
149 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-PipingGetAccountToGetKey"); |
| 140 | + TestRunner.RunTestScript("Test-PipingGetAccountToGetKey"); |
150 | 141 | }
|
151 | 142 |
|
152 | 143 | [Fact]
|
153 | 144 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
154 | 145 | public void TestPipingToSetAccount()
|
155 | 146 | {
|
156 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-PipingToSetAzureAccount"); |
| 147 | + TestRunner.RunTestScript("Test-PipingToSetAzureAccount"); |
157 | 148 | }
|
158 | 149 |
|
159 | 150 | [Fact]
|
160 | 151 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
161 | 152 | public void TestMinMaxAccountNames()
|
162 | 153 | {
|
163 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-MinMaxAccountName"); |
| 154 | + TestRunner.RunTestScript("Test-MinMaxAccountName"); |
164 | 155 | }
|
165 | 156 |
|
166 | 157 |
|
167 | 158 | [Fact]
|
168 | 159 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
169 | 160 | public void TestGetUsages()
|
170 | 161 | {
|
171 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-GetUsages"); |
| 162 | + TestRunner.RunTestScript("Test-GetUsages"); |
172 | 163 | }
|
173 | 164 |
|
174 | 165 | [Fact]
|
175 | 166 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
176 | 167 | public void TestManagedIdentity()
|
177 | 168 | {
|
178 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-ManagedIdentity"); |
| 169 | + TestRunner.RunTestScript("Test-ManagedIdentity"); |
179 | 170 | }
|
180 | 171 |
|
181 | 172 | [Fact]
|
182 | 173 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
183 | 174 | public void TestUserAssignedIdentity()
|
184 | 175 | {
|
185 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-UserAssignedIdentity"); |
| 176 | + TestRunner.RunTestScript("Test-UserAssignedIdentity"); |
186 | 177 | }
|
187 | 178 |
|
188 | 179 | [Fact]
|
189 | 180 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
190 | 181 | public void TestEncryption()
|
191 | 182 | {
|
192 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-Encryption"); |
| 183 | + TestRunner.RunTestScript("Test-Encryption"); |
193 | 184 | }
|
194 | 185 |
|
195 | 186 | [Fact]
|
196 | 187 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
197 | 188 | public void TestUserOwnedStorage()
|
198 | 189 | {
|
199 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-UserOwnedStorage"); |
| 190 | + TestRunner.RunTestScript("Test-UserOwnedStorage"); |
200 | 191 | }
|
201 | 192 |
|
202 | 193 | [Fact]
|
203 | 194 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
204 | 195 | public void TestPrivateEndpoint()
|
205 | 196 | {
|
206 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-PrivateEndpoint"); |
| 197 | + TestRunner.RunTestScript("Test-PrivateEndpoint"); |
207 | 198 | }
|
208 | 199 |
|
209 | 200 | [Fact]
|
210 | 201 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
211 | 202 | public void TestPublicNetworkAccess()
|
212 | 203 | {
|
213 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-PublicNetworkAccess"); |
| 204 | + TestRunner.RunTestScript("Test-PublicNetworkAccess"); |
214 | 205 | }
|
215 | 206 |
|
216 | 207 | [Fact]
|
217 | 208 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
218 | 209 | public void TestRestrictOutboundNetworkAccess()
|
219 | 210 | {
|
220 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-RestrictOutboundNetworkAccess"); |
| 211 | + TestRunner.RunTestScript("Test-RestrictOutboundNetworkAccess"); |
221 | 212 | }
|
222 | 213 |
|
223 | 214 | [Fact]
|
224 | 215 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
225 | 216 | public void TestDisableLocalAuth()
|
226 | 217 | {
|
227 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-DisableLocalAuth"); |
| 218 | + TestRunner.RunTestScript("Test-DisableLocalAuth"); |
228 | 219 | }
|
229 | 220 |
|
230 | 221 | [Fact]
|
231 | 222 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
232 | 223 | public void TestCapabilities()
|
233 | 224 | {
|
234 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-Capabilities"); |
| 225 | + TestRunner.RunTestScript("Test-Capabilities"); |
235 | 226 | }
|
236 | 227 |
|
237 | 228 | [Fact]
|
238 | 229 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
239 | 230 | public void TestApiProperties()
|
240 | 231 | {
|
241 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-ApiProperties"); |
| 232 | + TestRunner.RunTestScript("Test-ApiProperties"); |
242 | 233 | }
|
243 | 234 |
|
244 | 235 | [Fact]
|
245 | 236 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
246 | 237 | public void TestSoftDelete()
|
247 | 238 | {
|
248 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-SoftDelete"); |
| 239 | + TestRunner.RunTestScript("Test-SoftDelete"); |
249 | 240 | }
|
250 | 241 |
|
251 | 242 | [Fact]
|
252 | 243 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
253 | 244 | public void TestCommitmentPlan()
|
254 | 245 | {
|
255 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-CommitmentPlan"); |
| 246 | + TestRunner.RunTestScript("Test-CommitmentPlan"); |
256 | 247 | }
|
257 | 248 |
|
258 | 249 | [Fact]
|
259 | 250 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
260 | 251 | public void TestDeployment()
|
261 | 252 | {
|
262 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-Deployment"); |
| 253 | + TestRunner.RunTestScript("Test-Deployment"); |
263 | 254 | }
|
264 | 255 |
|
265 | 256 | [Fact]
|
266 | 257 | [Trait(Category.AcceptanceType, Category.CheckIn)]
|
267 | 258 | public void TestListModels()
|
268 | 259 | {
|
269 |
| - TestController.NewInstance.RunPsTest(traceInterceptor, "Test-ListModels"); |
| 260 | + TestRunner.RunTestScript("Test-ListModels"); |
270 | 261 | }
|
271 | 262 | }
|
272 | 263 | }
|
0 commit comments