コード例 #1
0
        public async void DeleteRefreshTokenWithNull()
        {
            RefreshTokenService refreshService = new RefreshTokenService(_repo);

            var result = await refreshService.DeleteRefreshToken(null);

            Assert.False(result);
        }
コード例 #2
0
        public async void DeleteRefreshTokenWithRightToken()
        {
            string token = "token";

            _repo.DeleteRefreshToken(token).Returns(true);

            RefreshTokenService refreshService = new RefreshTokenService(_repo);

            var result = await refreshService.DeleteRefreshToken(token);

            Assert.True(result);
        }
コード例 #3
0
        public async void DeleteRefreshTokenWithWrongToken()
        {
            string token = "token";

            _repo.DeleteRefreshToken(token).Returns(false);

            RefreshTokenService refreshService = new RefreshTokenService(_repo);

            var result = await refreshService.DeleteRefreshToken(token);

            Assert.False(result);
        }