pct-encode a String, ensuring that all reserved characters are encoded.
()
| 28 | |
| 29 | /** pct-encode a String, ensuring that all reserved characters are encoded. */ |
| 30 | @Test |
| 31 | void pctEncode() { |
| 32 | String queryParameterValue = "firstName=James;lastName=Bond;location=England&Britain?"; |
| 33 | assertThat(UriUtils.encode(queryParameterValue, UTF_8)) |
| 34 | .isEqualToIgnoringCase( |
| 35 | "firstName%3DJames%3BlastName%3DBond%3Blocation%3DEngland%26Britain%3F"); |
| 36 | } |
| 37 | |
| 38 | /** pct-encode preserving reserved characters. */ |
| 39 | @Test |
nothing calls this directly
no test coverage detected