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()); }
/// <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); }
public void ValidToken() { SampleTokenValidationClass classUnderTest = new SampleTokenValidationClass(); classUnderTest.ValidateTokenShim(testTokenCreator.CreateDefaultValidToken()); }
public void ValidToken_Deprecated() { SampleTokenValidationClass classUnderTest = new SampleTokenValidationClass(); classUnderTest.ValidateTokenShimWithDeprecatedModel(testTokenCreator.CreateDefaultValidToken()); }