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

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

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

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