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

Properly support subclassing of WireMockExtension #1614

Closed
tomakehurst opened this issue Oct 1, 2021 · 0 comments
Closed

Properly support subclassing of WireMockExtension #1614

tomakehurst opened this issue Oct 1, 2021 · 0 comments

Comments

@tomakehurst
Copy link
Member

Per this comment: #1439 (comment)

Subclassing the JUnit 4 rule is very useful a) to be able to hook into its before/after lifecycle methods and b) to create API wrappers around specific mock APIs.

WireMockExtension for JUnit 5 should support this too, with the following considerations:

  • Lifecycle template methods created as with the JUnit 4 rule (but all 4, rather than 2). These should probably take WireMockRuntimeInfo as a parameter.
  • How to handle constructors in a way that avoids a new overload being created each time we add a new parameter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant