File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
tests/Microsoft.Identity.Test.Unit/PublicApiTests Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1- // Copyright (c) Microsoft Corporation. All rights reserved.
1+ // Copyright (c) Microsoft Corporation. All rights reserved.
22// Licensed under the MIT License.
33
44#if ! ANDROID && ! iOS
@@ -872,7 +872,13 @@ public async Task EnsureDefaultCacheKeyBehaviorWhenCertSerialNumberIsNotUsedTest
872872 Assert . AreEqual ( TokenSource . IdentityProvider , result . AuthenticationResultMetadata . TokenSource ) ;
873873 Assert . AreEqual ( "header.payload.signature" , result . AccessToken ) ;
874874
875- var token = app2 . AppTokenCacheInternal . Accessor . GetAllAccessTokens ( ) . Where ( x => x . AdditionalCacheKeyComponents . Any ( ) ) . FirstOrDefault ( ) ;
875+ var token = app2 . AppTokenCacheInternal . Accessor . GetAllAccessTokens ( )
876+ . Where ( x =>
877+ x . AdditionalCacheKeyComponents ? . Any ( ) == true &&
878+ x . AdditionalCacheKeyComponents . Any ( ) ) . FirstOrDefault ( ) ;
879+
880+ Assert . IsNotNull ( token ) ;
881+
876882 Assert . AreEqual ( certificate . SerialNumber , token . AdditionalCacheKeyComponents . FirstOrDefault ( ) . Value ) ;
877883 }
878884 }
You can’t perform that action at this time.
0 commit comments