-
Notifications
You must be signed in to change notification settings - Fork 228
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
Cleanup tests #1856
Cleanup tests #1856
Conversation
4e1f910
to
3dfd234
Compare
3dfd234
to
c49fbf7
Compare
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
elide-integration-tests/src/test/java/com/yahoo/elide/async/integration/tests/AsyncIT.java
Show resolved
Hide resolved
elide-standalone/src/test/java/example/ElideStandaloneTest.java
Outdated
Show resolved
Hide resolved
90b249e
to
2a30f12
Compare
2a30f12
to
cbbc345
Compare
assertEquals(getResult3, expected3); | ||
assertEquals(getResult5, expected5); | ||
assertEquals(getResult6, expected5); | ||
.body(equalTo(expected5)); |
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.
expected6?
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.
No, that is how it worked.
assertEquals(getResult5, expected5);
assertEquals(getResult6, expected5);
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.
I assume it is making 2 different requests expecting the same results.
.contentType(JSONAPI_CONTENT_TYPE) | ||
.accept(JSONAPI_CONTENT_TYPE) | ||
.get("/filterExpressionCheckObj/3") | ||
.then() | ||
.statusCode(HttpStatus.SC_NOT_FOUND) | ||
.extract().response().asString(); | ||
.statusCode(HttpStatus.SC_NOT_FOUND); |
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.
compare to expected4?
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.
No, there was no expected4. We could add one?
assertEquals(getResult3, expected3);
assertEquals(getResult5, expected5);
assertEquals(getResult6, expected5);
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.
It would resemble
{
"errors": [
{
"detail": "Unknown identifier 3 for filterExpressionCheckObj"
}
]
}
Description
Cleanup test syntax for better readability.
Using RestAssured with matchers will generate better debug on failure.
Motivation and Context
Code quality.
How Has This Been Tested?
Unit tests
License
I confirm that this contribution is made under an Apache 2.0 license and that I have the authority necessary to make this contribution on behalf of its copyright owner.