Remove special characters from the test.
We are testing URL encoding and decoding, but the special characters can be expressed as Unicode (e.g., \u9999), so the file does not need to be stored as UTF-8 or equivalent.
This commit is contained in:
parent
eee9d5ab97
commit
2bf1498c0b
1 changed files with 2 additions and 2 deletions
|
@ -74,14 +74,14 @@ public class UrlBuilderTest extends AbstractTestClass {
|
|||
UrlBuilder.contextPath = "/vivo";
|
||||
String path = "/individual";
|
||||
ParamMap params = new ParamMap();
|
||||
params.put("name", "★Tom★");
|
||||
params.put("name", "\u2605Tom\u2605"); // \u2605 is Unicode for a five-pointed star.
|
||||
Assert.assertEquals("/vivo/individual?name=%E2%98%85Tom%E2%98%85", UrlBuilder.getUrl(path, params));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testDecodeUtf8Url() {
|
||||
String vClassUri = "http://vivoweb.org/ontology/core#FacultyMember★";
|
||||
String vClassUri = "http://vivoweb.org/ontology/core#FacultyMember\u2605"; // \u2605 is Unicode for a five-pointed star.
|
||||
String vClassUriEncoded = "http%3A%2F%2Fvivoweb.org%2Fontology%2Fcore%23FacultyMember%E2%98%85";
|
||||
Assert.assertEquals(vClassUri, UrlBuilder.urlDecode(vClassUriEncoded));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue