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

Add MockRestServiceServer.verify to default assertions #593

Merged
merged 2 commits into from
Sep 6, 2024
Merged

Add MockRestServiceServer.verify to default assertions #593

merged 2 commits into from
Sep 6, 2024

Conversation

ArloL
Copy link
Contributor

@ArloL ArloL commented Sep 6, 2024

What's changed?

Add MockRestServiceServer.verify to the list of default assertions that indicate whether a test has an assertion or not

What's your motivation?

I came across openrewrite for the first time today and immediately tried it out - I found everything to work great - except for this minor case in one test file. Thanks so much for all the hard work on something like this 🙏🏼

Anything in particular you'd like reviewers to focus on?

It's my first contribution so I hope I did everything right; regards to formatting and commit messages, etc. Please let me know if I should change something.

Have you considered any alternatives or workarounds?

I could configure it for my application via the additionalAsserts option but I think it is a valid case to have it be added to the defaults.

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

@timtebeek timtebeek changed the title add MockRestServiceServer.verify to default assertions Add MockRestServiceServer.verify to default assertions Sep 6, 2024
@timtebeek timtebeek added enhancement New feature or request good first issue Good for newcomers labels Sep 6, 2024
@timtebeek
Copy link
Contributor

Welcome to the project and thanks for the nice words and immediate suggestion for improvement.

Your PR was near perfect; I've just made a small change since the jar you added would only be needed for tests here. Thanks a lot, and if you come across any other improvements do let us know!

There's tons more use cases like SLF4J best practices or switching to AssertJ that might interest you as well. Enjoy your weekend!

@timtebeek timtebeek merged commit 8d8970d into openrewrite:main Sep 6, 2024
2 checks passed
@timtebeek
Copy link
Contributor

Your change has been merged and should become available through our snapshot versions in fifteen minutes or so. We release every two weeks, the next one being next Wednesday. Thanks and hope to see you again!

@ArloL ArloL deleted the patch-1 branch September 7, 2024 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants