-
Notifications
You must be signed in to change notification settings - Fork 2
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
Test server endpoints #483
base: main
Are you sure you want to change the base?
Conversation
Otherwise, JavaSpark intervenes and returns a 404 HTML page.
It was meant to be in a different branch.
…or every endpoint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking awesome! This will be a big help in making sure our code actually works. The way that MockEndpointProvider implements EndpointProvider is great, because that will force us anytime we go add a new endpoint to go add it in the testing set up. To that end, currently the MockEndpointProvider is missing the shutdown, so the tests don't compile. Otherwise, it LGTM!
First by authorization (none/student/admin), then alphabetically by path.
Our TestServerFacade thinks PATCH is invalid, and it's arguably kinda pointless anyway.
src/test/java/edu/byu/cs/server/exception/ResponseParseException.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Adds a simple framework for testing Server endpoints and implements some basic tests.
Significant changes
Mockito.mock()
doesn't work on its own)Dependencies