@@ -38,7 +38,7 @@ public void ValidateCtorNoOptions()
3838 }
3939
4040 [ Test ]
41- public void ValidateCtorIncludedInteractiveParam ( [ Values ( true , false ) ] bool includeInteractive )
41+ public void ValidateCtorIncludedInteractiveParam ( [ Values ( true , false ) ] bool includeInteractive )
4242 {
4343 var cred = new DefaultAzureCredential ( includeInteractive ) ;
4444
@@ -110,7 +110,7 @@ public void ValidateCtorOptionsPassedToCredentials()
110110
111111 [ Test ]
112112 [ NonParallelizable ]
113- public void ValidateEnvironmentBasedOptionsPassedToCredentials ( [ Values ] bool clientIdSpecified , [ Values ] bool usernameSpecified , [ Values ] bool tenantIdSpecified )
113+ public void ValidateEnvironmentBasedOptionsPassedToCredentials ( [ Values ] bool clientIdSpecified , [ Values ] bool usernameSpecified , [ Values ] bool tenantIdSpecified )
114114 {
115115 var expClientId = clientIdSpecified ? Guid . NewGuid ( ) . ToString ( ) : null ;
116116 var expUsername = usernameSpecified ? Guid . NewGuid ( ) . ToString ( ) : null ;
@@ -121,9 +121,11 @@ public void ValidateEnvironmentBasedOptionsPassedToCredentials([Values]bool clie
121121 bool onCreateVsCalled = false ;
122122 bool onCreateVsCodeCalled = false ;
123123
124- using ( new TestEnvVar ( "AZURE_CLIENT_ID" , expClientId ) )
125- using ( new TestEnvVar ( "AZURE_USERNAME" , expUsername ) )
126- using ( new TestEnvVar ( "AZURE_TENANT_ID" , expTenantId ) )
124+ using ( new TestEnvVar ( new ( )
125+ {
126+ { "AZURE_CLIENT_ID" , expClientId } ,
127+ { "AZURE_USERNAME" , expUsername } ,
128+ { "AZURE_TENANT_ID" , expTenantId } } ) )
127129 {
128130 var credFactory = new MockDefaultAzureCredentialFactory ( CredentialPipeline . GetInstance ( null ) ) ;
129131
@@ -191,9 +193,11 @@ public void ValidateEmptyEnvironmentBasedOptionsNotPassedToCredentials([Values]
191193 bool onCreateVsCalled = false ;
192194 bool onCreateVsCodeCalled = false ;
193195
194- using ( new TestEnvVar ( "AZURE_CLIENT_ID" , expClientId ) )
195- using ( new TestEnvVar ( "AZURE_USERNAME" , expUsername ) )
196- using ( new TestEnvVar ( "AZURE_TENANT_ID" , expTenantId ) )
196+ using ( new TestEnvVar ( new ( )
197+ {
198+ { "AZURE_CLIENT_ID" , expClientId } ,
199+ { "AZURE_USERNAME" , expUsername } ,
200+ { "AZURE_TENANT_ID" , expTenantId } } ) )
197201 {
198202 var credFactory = new MockDefaultAzureCredentialFactory ( CredentialPipeline . GetInstance ( null ) ) ;
199203
@@ -249,13 +253,13 @@ public void ValidateEmptyEnvironmentBasedOptionsNotPassedToCredentials([Values]
249253 }
250254
251255 [ Test ]
252- public void ValidateCtorWithExcludeOptions ( [ Values ( true , false ) ] bool excludeEnvironmentCredential ,
253- [ Values ( true , false ) ] bool excludeManagedIdentityCredential ,
254- [ Values ( true , false ) ] bool excludeSharedTokenCacheCredential ,
255- [ Values ( true , false ) ] bool excludeVisualStudioCredential ,
256- [ Values ( true , false ) ] bool excludeVisualStudioCodeCredential ,
257- [ Values ( true , false ) ] bool excludeCliCredential ,
258- [ Values ( true , false ) ] bool excludeInteractiveBrowserCredential )
256+ public void ValidateCtorWithExcludeOptions ( [ Values ( true , false ) ] bool excludeEnvironmentCredential ,
257+ [ Values ( true , false ) ] bool excludeManagedIdentityCredential ,
258+ [ Values ( true , false ) ] bool excludeSharedTokenCacheCredential ,
259+ [ Values ( true , false ) ] bool excludeVisualStudioCredential ,
260+ [ Values ( true , false ) ] bool excludeVisualStudioCodeCredential ,
261+ [ Values ( true , false ) ] bool excludeCliCredential ,
262+ [ Values ( true , false ) ] bool excludeInteractiveBrowserCredential )
259263 {
260264 var credFactory = new MockDefaultAzureCredentialFactory ( CredentialPipeline . GetInstance ( null ) ) ;
261265
@@ -311,13 +315,13 @@ public void ValidateCtorWithExcludeOptions([Values(true, false)]bool excludeEnvi
311315 }
312316
313317 [ Test ]
314- public void ValidateAllUnavailable ( [ Values ( true , false ) ] bool excludeEnvironmentCredential ,
315- [ Values ( true , false ) ] bool excludeManagedIdentityCredential ,
316- [ Values ( true , false ) ] bool excludeSharedTokenCacheCredential ,
317- [ Values ( true , false ) ] bool excludeVisualStudioCredential ,
318- [ Values ( true , false ) ] bool excludeVisualStudioCodeCredential ,
319- [ Values ( true , false ) ] bool excludeCliCredential ,
320- [ Values ( true , false ) ] bool excludeInteractiveBrowserCredential )
318+ public void ValidateAllUnavailable ( [ Values ( true , false ) ] bool excludeEnvironmentCredential ,
319+ [ Values ( true , false ) ] bool excludeManagedIdentityCredential ,
320+ [ Values ( true , false ) ] bool excludeSharedTokenCacheCredential ,
321+ [ Values ( true , false ) ] bool excludeVisualStudioCredential ,
322+ [ Values ( true , false ) ] bool excludeVisualStudioCodeCredential ,
323+ [ Values ( true , false ) ] bool excludeCliCredential ,
324+ [ Values ( true , false ) ] bool excludeInteractiveBrowserCredential )
321325 {
322326 if ( excludeEnvironmentCredential && excludeManagedIdentityCredential && excludeSharedTokenCacheCredential && excludeVisualStudioCredential && excludeVisualStudioCodeCredential && excludeCliCredential && excludeInteractiveBrowserCredential )
323327 {
@@ -401,7 +405,7 @@ public void ValidateAllUnavailable([Values(true, false)]bool excludeEnvironmentC
401405 }
402406
403407 [ Test ]
404- public void ValidateUnhandledException ( [ Values ( 0 , 1 , 2 , 3 , 4 , 5 , 6 ) ] int exPossition )
408+ public void ValidateUnhandledException ( [ Values ( 0 , 1 , 2 , 3 , 4 , 5 , 6 ) ] int exPossition )
405409 {
406410 var credFactory = new MockDefaultAzureCredentialFactory ( CredentialPipeline . GetInstance ( null ) ) ;
407411
@@ -541,7 +545,7 @@ public void ValidateUnhandledException([Values(0, 1, 2, 3, 4, 5, 6)]int exPossit
541545 }
542546
543547 [ Test ]
544- public async Task ValidateSelectedCredentialCaching ( [ Values ( typeof ( EnvironmentCredential ) , typeof ( ManagedIdentityCredential ) , typeof ( SharedTokenCacheCredential ) , typeof ( VisualStudioCredential ) , typeof ( VisualStudioCodeCredential ) , typeof ( AzureCliCredential ) , typeof ( InteractiveBrowserCredential ) ) ] Type availableCredential )
548+ public async Task ValidateSelectedCredentialCaching ( [ Values ( typeof ( EnvironmentCredential ) , typeof ( ManagedIdentityCredential ) , typeof ( SharedTokenCacheCredential ) , typeof ( VisualStudioCredential ) , typeof ( VisualStudioCodeCredential ) , typeof ( AzureCliCredential ) , typeof ( InteractiveBrowserCredential ) ) ] Type availableCredential )
545549 {
546550 var expToken = new AccessToken ( Guid . NewGuid ( ) . ToString ( ) , DateTimeOffset . MaxValue ) ;
547551
0 commit comments