Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added sample tests for the new validation path #2801

Closed
wants to merge 2 commits into from

Conversation

iNinja
Copy link
Contributor

@iNinja iNinja commented Aug 29, 2024

Added sample tests for the new validation path

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • If any gains or losses in performance are possible, you've included benchmarks for your changes. More info
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Description

Added sample tests for new validation path and aligned errors returned.

Part of #2711

@iNinja iNinja requested a review from a team as a code owner August 29, 2024 17:20
@@ -4,6 +4,7 @@
using System;
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
using System.Threading;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need a new assembly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CancellationToken requires it.

/// Tests how the class under test handles a token which is not yet valid
/// </summary>
[Fact]
public void NetYetValidToken_NewPath()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is too fractured.
We need sets of tests using TheoryData for Lifetime, Audience, etc.
Why not part of JsonWebTokenHandler.ValidateLifetimeTests

@iNinja
Copy link
Contributor Author

iNinja commented Sep 3, 2024

These tests are being removed.

@iNinja iNinja closed this Sep 3, 2024
@iNinja iNinja deleted the iinglese/new-result-sample-tests branch November 15, 2024 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants