1+ // ----------------------------------------------------------------------------------
2+ //
3+ // Copyright Microsoft Corporation
4+ // Licensed under the Apache License, Version 2.0 (the "License");
5+ // you may not use this file except in compliance with the License.
6+ // You may obtain a copy of the License at
7+ // http://www.apache.org/licenses/LICENSE-2.0
8+ // Unless required by applicable law or agreed to in writing, software
9+ // distributed under the License is distributed on an "AS IS" BASIS,
10+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+ // See the License for the specific language governing permissions and
12+ // limitations under the License.
13+ // ----------------------------------------------------------------------------------
14+
15+ using System . Collections . Generic ;
16+ using Microsoft . Azure . Commands . TestFx ;
17+ using Xunit . Abstractions ;
18+
19+ namespace Microsoft . Azure . Commands . Cdn . Test . ScenarioTests
20+ {
21+ public class CdnTestRunner
22+ {
23+ protected readonly ITestRunner TestRunner ;
24+
25+ protected CdnTestRunner ( ITestOutputHelper output )
26+ {
27+ TestRunner = TestManager . CreateInstance ( output )
28+ . WithNewPsScriptFilename ( $ "{ GetType ( ) . Name } .ps1")
29+ . WithProjectSubfolderForTests ( "ScenarioTests" )
30+ . WithCommonPsScripts ( new [ ]
31+ {
32+ @"Common.ps1" ,
33+ @"../AzureRM.Resources.ps1" ,
34+ } )
35+ . WithNewRmModules ( helper => new [ ]
36+ {
37+ helper . RMProfileModule ,
38+ helper . GetRMModulePath ( "Az.Cdn.psd1" )
39+ } )
40+ . WithNewRecordMatcherArguments (
41+ userAgentsToIgnore : new Dictionary < string , string >
42+ {
43+ { "Microsoft.Azure.Management.Resources.ResourceManagementClient" , "2016-02-01" } ,
44+ } ,
45+ resourceProviders : new Dictionary < string , string >
46+ {
47+ { "Microsoft.Resources" , null } ,
48+ { "Microsoft.Features" , null } ,
49+ { "Microsoft.Authorization" , null } ,
50+ { "Microsoft.Compute" , null }
51+ }
52+ )
53+ . Build ( ) ;
54+ }
55+ }
56+ }
0 commit comments