@@ -85,6 +85,26 @@ public void RunPsTest(XunitTracingInterceptor logger, params string[] scripts)
85
85
logger . Information ( string . Format ( "Test method finished: {0}.{1}" , callingClassType , mockName ) ) ;
86
86
}
87
87
88
+ /// <summary>
89
+ /// Gets storage management client.
90
+ /// </summary>
91
+ static public IRecordMatcher GetRecordMatcher ( )
92
+ {
93
+ var d = new Dictionary < string , string >
94
+ {
95
+ { "Microsoft.Resources" , null } ,
96
+ { "Microsoft.Features" , null } ,
97
+ { "Microsoft.Authorization" , null } ,
98
+ { "Microsoft.Network" , null } ,
99
+ } ;
100
+ var providersToIgnore = new Dictionary < string , string >
101
+ {
102
+ { "Microsoft.Azure.Management.Resources.ResourceManagementClient" , "2016-02-01" } ,
103
+ { "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient" , "2017-05-10" } ,
104
+ } ;
105
+ return new PermissiveRecordMatcherWithApiExclusion ( true , d , providersToIgnore ) ;
106
+ }
107
+
88
108
/// <summary>
89
109
/// RunPsTestWorkflow.
90
110
/// </summary>
@@ -103,18 +123,7 @@ protected void RunPsTestWorkflow(
103
123
Action initialize = null )
104
124
{
105
125
this . helper . TracingInterceptor = logger ;
106
- var d = new Dictionary < string , string >
107
- {
108
- { "Microsoft.Resources" , null } ,
109
- { "Microsoft.Features" , null } ,
110
- { "Microsoft.Authorization" , null } ,
111
- } ;
112
- var providersToIgnore = new Dictionary < string , string >
113
- {
114
- { "Microsoft.Azure.Management.Resources.ResourceManagementClient" , "2016-02-01" } ,
115
- { "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient" , "2017-05-10" } ,
116
- } ;
117
- HttpMockServer . Matcher = new PermissiveRecordMatcherWithApiExclusion ( true , d , providersToIgnore ) ;
126
+ HttpMockServer . Matcher = GetRecordMatcher ( ) ;
118
127
HttpMockServer . RecordsDirectory = Path . Combine ( AppDomain . CurrentDomain . BaseDirectory , "SessionRecords" ) ;
119
128
using ( var context = new HpcCacheTestContext ( callingClassType , mockName ) )
120
129
{
0 commit comments