Example #1
0
            public void ShouldInvalidateTheIdentityToken(
                [Frozen, Substitute] ICacheUtils cacheUtils,
                [Target] CacheController controller
                )
            {
                controller.ClearAll();

                cacheUtils.Received().InvalidatePrimaryToken();
            }
Example #2
0
            public void ShouldInvalidateAllUserTokens(
                [Frozen, Substitute] ICacheUtils cacheUtils,
                [Target] CacheController controller
                )
            {
                controller.ClearAll();

                cacheUtils.Received().InvalidateAllUserTokens();
            }
Example #3
0
            public void ShouldRemoveAnyUserTokensForTheGivenIdentityId(
                Guid identityId,
                [Frozen, Substitute] ICacheUtils cacheUtils,
                [Target] CacheController controller
                )
            {
                controller.ClearUserSpecificCache(identityId);

                cacheUtils.Received().InvalidateTokensForUser(Is(identityId.ToString()));
            }