示例#1
0
        public void TokenWithMissingNotBefore_Deprecated()
        {
            // NOTE: This is not currently validated and there's no way to enforce its presence.
            //       It may be enforceable in the future, in which case this will be updated with proper checks.
            SampleTokenValidationClass classUnderTest = new SampleTokenValidationClass();

            classUnderTest.ValidateTokenShimWithDeprecatedModel(testTokenCreator.CreateTokenWithMissingNotBefore());
        }
示例#2
0
        /// <summary>
        /// Calls the class under test with a token and validates the outcome.
        /// </summary>
        /// <param name="generateTokenToTest">Function which returns the JWS to test with.</param>
        /// <param name="expectedInnerExceptionType">The inner exception type expected.</param>
        /// <param name="expectedInnerExceptionMessagePart">A string the inner exception message is expected to contain.</param>
        internal void TestWithGeneratedToken(Func <string> generateTokenToTest, Type expectedInnerExceptionType, string expectedInnerExceptionMessagePart)
        {
            SampleTokenValidationClass classUnderTest = new SampleTokenValidationClass();

            TestWithGeneratedToken(
                classUnderTest.ValidateTokenShim,
                generateTokenToTest,
                expectedInnerExceptionType,
                expectedInnerExceptionMessagePart);
        }
示例#3
0
        public void ValidToken()
        {
            SampleTokenValidationClass classUnderTest = new SampleTokenValidationClass();

            classUnderTest.ValidateTokenShim(testTokenCreator.CreateDefaultValidToken());
        }
示例#4
0
        public void ValidToken_Deprecated()
        {
            SampleTokenValidationClass classUnderTest = new SampleTokenValidationClass();

            classUnderTest.ValidateTokenShimWithDeprecatedModel(testTokenCreator.CreateDefaultValidToken());
        }