Skip to content

feat: Make method and MethodExactMatcher case in-sensitive #165

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 2 commits into
base: main
Choose a base branch
from

Conversation

BobrImperator
Copy link

@BobrImperator BobrImperator commented Jul 25, 2025

Currently a mock defined as Mock::given(method("Get")) would fail a test due to the MethodExactMatcher being case sensitive.

  • Changes MethodExactMatcher to allow a mocked method to be case in-sensitive.
    Wiremock will automatically convert a provided method to uppercase.
    This makes it so both Mock::given(method("GET")) and Mock::given(method("Get")) will pass a test.
  • Adds a test making sure that Mock::given(method(Method::Get)) is still compatible.

@BobrImperator BobrImperator force-pushed the make-method-case-insensitive branch from 7bd53a0 to d3751f0 Compare July 29, 2025 11:54
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