Repository navigation
Conversation
|
@froque please review |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4034 +/- ##
=========================================
Coverage 94.19% 94.19%
- Complexity 6676 6685 +9
=========================================
Files 432 432
Lines 20951 20960 +9
Branches 2106 2107 +1
=========================================
+ Hits 19734 19744 +10
Misses 760 760
+ Partials 457 456 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| } | ||
|
|
||
| private boolean isFormLike() { | ||
| var contentType = request.getHeaders().get(HttpHeader.CONTENT_TYPE); |
There was a problem hiding this comment.
In my project unit tests, I am usingRestAssured that adds charset by default.
application/x-www-form-urlencoded;charset=iso-8859-1
Test against FORM_ENCODED_UTF_8 and FORM_ENCODED_8859_1 as well ?
Some reports indicate that charset is not valid here
request/request#701
spring-cloud/spring-cloud-gateway#3522
lysine-dev/okhttp#4210
But we should still not fail if it is sent.
| } | ||
|
|
||
| @ServerTest | ||
| public void readFormDataBeforeBody(ServerTestRunner runner) { |
There was a problem hiding this comment.
the test name is swapped. this should be readFormDataAfterBody
| "/", | ||
| ctx -> { | ||
| try { | ||
| Assertions.assertAll( |
There was a problem hiding this comment.
I made a mistake, this is not how to use assertAll
assertAll(
"Grouped Assertions of User",
() -> assertEquals("admin", user.getUsername(), "Username should be admin"),
() -> assertEquals("admin@baeldung.com", user.getEmail(), "Email should be admin@baeldung.com"),
() -> assertTrue(user.getActivated(), "User should be activated")
);https://www.baeldung.com/junit5-assertall-vs-multiple-assertions
…ll servers
fixes #4031