Esempio n. 1
0
        public void Decode_IfJwtIsIncorrect_ReturnsNull(string jwtToken)
        {
            var encoder = new JwtEncoder();

            var actual = encoder.Decode(jwtToken);

            Assert.IsNull(actual);
        }
Esempio n. 2
0
        public void Decode_IfJwtIsCorrect_ReturnsCorrectData(int expectedClaimsCount, string jwtToken)
        {
            var encoder = new JwtEncoder();

            var actual = encoder.Decode(jwtToken);

            Assert.AreEqual(expectedClaimsCount, actual.Claims.Count());
        }