Exemplo n.º 1
0
        public void CheckTokenGeneration()
        {
            var token = JWTService.GenerateUserToken(Login, Password, UserId.ToString());

            Assert.IsNotNull(token);
            Assert.IsTrue(token.Length > 0);
        }
Exemplo n.º 2
0
        public void CheckToken()
        {
            var token = JWTService.GenerateUserToken(Login, Password, UserId.ToString());

            var obj = JWTService.DecodeUserToken(token);

            Assert.AreEqual(obj.Login, Login);
            Assert.AreEqual(obj.Password, Password);
            Assert.AreEqual(obj.Userid, this.UserId.ToString());
        }