@@ -33,8 +33,7 @@ public AuthenticationHelpersTests()
3333 public async Task ShouldUseDelegateAuthProviderWhenUserAccessTokenIsProvidedAsync ( )
3434 {
3535 // Arrange
36- string dummyAccessToken = "eyJhbGciOiJIUzI1NiJ9.eyJSb2xlIjoiVGVzdCIsIklzc3VlciI6Iklzc3VlciIsIlVzZXJuYW1lIjoiVGVzdCIsImV4cCI6MTY3ODQ4ODgxNiwiaWF0IjoxNjc4NDg4ODE2fQ.hpYypwHAV8H3jb4KuTiLpgLWy9A8H2d9HG7SxJ8Kpn0" ;
37- GraphSession . Instance . InMemoryTokenCache = new InMemoryTokenCache ( Encoding . UTF8 . GetBytes ( dummyAccessToken ) ) ;
36+ GraphSession . Instance . InMemoryTokenCache = new InMemoryTokenCache ( Encoding . UTF8 . GetBytes ( MockConstants . DummyAccessToken ) ) ;
3837 AuthContext userProvidedAuthContext = new AuthContext
3938 {
4039 AuthType = AuthenticationType . UserProvidedAccessToken ,
@@ -48,8 +47,8 @@ public async Task ShouldUseDelegateAuthProviderWhenUserAccessTokenIsProvidedAsyn
4847 var accessToken = await authProvider . GetAuthorizationTokenAsync ( requestMessage . RequestUri ) ;
4948
5049 // Assert
51- Assert . IsType < AzureIdentityAccessTokenProvider > ( authProvider ) ;
52- Assert . Equal ( dummyAccessToken , accessToken ) ;
50+ _ = Assert . IsType < AzureIdentityAccessTokenProvider > ( authProvider ) ;
51+ Assert . Equal ( MockConstants . DummyAccessToken , accessToken ) ;
5352 Assert . Equal ( GraphEnvironmentConstants . EnvironmentName . Global , userProvidedAuthContext . Environment ) ;
5453
5554 // reset static instance.
@@ -72,7 +71,7 @@ public async Task ShouldUseDeviceCodeWhenSpecifiedByUserAsync()
7271 TokenCredential tokenCredential = await AuthenticationHelpers . GetTokenCredentialAsync ( delegatedAuthContext , default ) ;
7372
7473 // Assert
75- Assert . IsType < DeviceCodeCredential > ( tokenCredential ) ;
74+ _ = Assert . IsType < DeviceCodeCredential > ( tokenCredential ) ;
7675
7776 // reset static instance.
7877 GraphSession . Reset ( ) ;
@@ -93,7 +92,7 @@ public async Task ShouldUseDeviceCodeWhenFallbackAsync()
9392 TokenCredential tokenCredential = await AuthenticationHelpers . GetTokenCredentialAsync ( delegatedAuthContext , default ) ;
9493
9594 // Assert
96- Assert . IsType < DeviceCodeCredential > ( tokenCredential ) ;
95+ _ = Assert . IsType < DeviceCodeCredential > ( tokenCredential ) ;
9796
9897 // reset static instance.
9998 GraphSession . Reset ( ) ;
@@ -113,7 +112,7 @@ public async Task ShouldUseInteractiveProviderWhenDelegatedAsync()
113112 TokenCredential tokenCredential = await AuthenticationHelpers . GetTokenCredentialAsync ( delegatedAuthContext , default ) ;
114113
115114 // Assert
116- Assert . IsType < InteractiveBrowserCredential > ( tokenCredential ) ;
115+ _ = Assert . IsType < InteractiveBrowserCredential > ( tokenCredential ) ;
117116
118117 // reset static instance.
119118 GraphSession . Reset ( ) ;
@@ -135,7 +134,7 @@ public async Task ShouldUseInteractiveAuthenticationProviderWhenDelegatedContext
135134 TokenCredential tokenCredential = await AuthenticationHelpers . GetTokenCredentialAsync ( delegatedAuthContext , default ) ;
136135
137136 // Assert
138- Assert . IsType < InteractiveBrowserCredential > ( tokenCredential ) ;
137+ _ = Assert . IsType < InteractiveBrowserCredential > ( tokenCredential ) ;
139138
140139 // reset static instance.
141140 GraphSession . Reset ( ) ;
@@ -167,13 +166,13 @@ public async Task ShouldUseClientCredentialProviderWhenAppOnlyContextIsProvidedA
167166 ContextScope = ContextScope . Process ,
168167 TenantId = mockAuthRecord . TenantId
169168 } ;
170- CreateAndStoreSelfSignedCert ( appOnlyAuthContext . CertificateSubjectName ) ;
169+ _ = CreateAndStoreSelfSignedCert ( appOnlyAuthContext . CertificateSubjectName ) ;
171170
172171 // Act
173172 TokenCredential tokenCredential = await AuthenticationHelpers . GetTokenCredentialAsync ( appOnlyAuthContext , default ) ;
174173
175174 // Assert
176- Assert . IsType < ClientCertificateCredential > ( tokenCredential ) ;
175+ _ = Assert . IsType < ClientCertificateCredential > ( tokenCredential ) ;
177176
178177 // reset
179178 DeleteSelfSignedCertByName ( appOnlyAuthContext . CertificateSubjectName ) ;
@@ -198,7 +197,7 @@ public async Task ShouldUseInMemoryCertificateWhenProvidedAsync()
198197 TokenCredential tokenCredential = await AuthenticationHelpers . GetTokenCredentialAsync ( appOnlyAuthContext , default ) ;
199198
200199 // Assert
201- Assert . IsType < ClientCertificateCredential > ( tokenCredential ) ;
200+ _ = Assert . IsType < ClientCertificateCredential > ( tokenCredential ) ;
202201
203202 GraphSession . Reset ( ) ;
204203 }
@@ -209,7 +208,7 @@ public async Task ShouldUseCertNameInsteadOfPassedInCertificateWhenBothAreSpecif
209208 // Arrange
210209 var dummyCertName = "CN=dummycert" ;
211210 var inMemoryCertName = "CN=inmemorycert" ;
212- CreateAndStoreSelfSignedCert ( dummyCertName ) ;
211+ _ = CreateAndStoreSelfSignedCert ( dummyCertName ) ;
213212 var inMemoryCertificate = CreateSelfSignedCert ( inMemoryCertName ) ;
214213 AuthContext appOnlyAuthContext = new AuthContext
215214 {
@@ -225,7 +224,7 @@ public async Task ShouldUseCertNameInsteadOfPassedInCertificateWhenBothAreSpecif
225224 TokenCredential tokenCredential = await AuthenticationHelpers . GetTokenCredentialAsync ( appOnlyAuthContext , default ) ;
226225
227226 // Assert
228- Assert . IsType < ClientCertificateCredential > ( tokenCredential ) ;
227+ _ = Assert . IsType < ClientCertificateCredential > ( tokenCredential ) ;
229228
230229 //CleanUp
231230 DeleteSelfSignedCertByName ( appOnlyAuthContext . CertificateSubjectName ) ;
@@ -254,7 +253,7 @@ public async Task ShouldUseCertThumbPrintInsteadOfPassedInCertificateWhenBothAre
254253 TokenCredential tokenCredential = await AuthenticationHelpers . GetTokenCredentialAsync ( appOnlyAuthContext , default ) ;
255254
256255 // Assert
257- Assert . IsType < ClientCertificateCredential > ( tokenCredential ) ;
256+ _ = Assert . IsType < ClientCertificateCredential > ( tokenCredential ) ;
258257
259258 //CleanUp
260259 DeleteSelfSignedCertByThumbprint ( appOnlyAuthContext . CertificateThumbprint ) ;
0 commit comments