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

Use spring HATEOAS to generate URIs for tests #1706

Draft
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

pshapiro4broad
Copy link
Member

@pshapiro4broad pshapiro4broad commented Jun 7, 2024

It's always bugged me that we hardcode URIs in our webmvc tests, and recently I found that spring has a library that can do this for us. I also found that spring has a way to bulk declare all the components that need to be mocked while testing, which we can use for the cases where a mock doesn't need any stubs.

To show what this looks like, I picked a test with a single use case of webmvc. If this seems like a good idea, we can start using it it for new tests too.

…ss level to bulk mock components that don't need stubbing
@pshapiro4broad pshapiro4broad requested review from a team as code owners June 7, 2024 15:32
@pshapiro4broad pshapiro4broad requested review from fboulnois and okotsopoulos and removed request for a team June 7, 2024 15:32
Copy link
Contributor

@rjohanek rjohanek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks great!

@pshapiro4broad pshapiro4broad marked this pull request as draft June 10, 2024 17:08
Copy link

sonarcloud bot commented Jul 10, 2024

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.

2 participants