Skip to content

test: Improving tests coverage for McpUriTemplateManager #488

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alxkm
Copy link

@alxkm alxkm commented Aug 13, 2025

Summary

Adds 8 new test cases to improve test coverage for McpUriTemplateManager functionality, focusing on real-world scenarios and edge cases.

Tests Added

  • Special characters handling: Tests variable values with @, -, . characters (emails, filenames)
  • Complex nested paths: Multi-level API paths with 3+ variables
  • Path matching validation: Ensures incorrect segment counts and static segments don't match
  • Variable positioning: Tests variables at path beginning (version prefixes)
  • Simple cases: Single variable templates and root-level variables
  • Adjacent variables: Consecutive variables without static separators

Coverage Improvements

  • Real-world scenarios: Covers common API patterns like /api/v1/org/{id}/project/{id}
  • Edge case protection: Root paths, consecutive variables, special characters
  • Regression prevention: Ensures matching logic works correctly for various path structures
  • Documentation: Tests serve as usage examples for the URI template manager

Testing

All new tests pass and complement existing test suite coverage.

@alxkm alxkm changed the title test: Improvig tests coverage for McpUriTemplateManager test: Improving tests coverage for McpUriTemplateManager Aug 13, 2025
Co-authored-by: Oleksandr Klymenko <[email protected]>
Signed-off-by: Oleksandr Klymenko <[email protected]>
@alxkm alxkm force-pushed the feature/add-uri-template-manager-tests branch from d21c89b to 611004c Compare August 13, 2025 19:39
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.

1 participant