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

@EnableWireMock should be @Inherited #83

Open
GokcenTim opened this issue Jan 27, 2025 · 1 comment
Open

@EnableWireMock should be @Inherited #83

GokcenTim opened this issue Jan 27, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@GokcenTim
Copy link

GokcenTim commented Jan 27, 2025

Proposal

The annotation @EnableWireMock should itself be annotated with @Inherited so that it is obvious it can be applied to classes that will be inherited by actual tests.

The WireMockContextCustomizerFactory does actually recursively search a class' superclasses for @EnableWireMock annotations, but this is not obvious from the documentation (neither README.md nor the Javadocs on @EnableWireMock mention it). Instead of performing the recursive search, annotating with @Inherited would make it obvious to users that the annotation can be used on super classes, as well as remove the need to recursively search the ancestors of the current class to find the annotation.

Alternatively, the documentation should be updated to indicate that superclasses will be searched.

References

No response

@GokcenTim GokcenTim added the enhancement New feature or request label Jan 27, 2025
@tomasbjerre
Copy link
Collaborator

I'll just add the annotation and not change anything else:
#85

If that is ok?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants