Skip to content

Commit

Permalink
URL Utils test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
maxme committed Sep 10, 2015
1 parent 2c0b2d5 commit b465a2e
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,18 @@ public void testAppendUrlParameters1() {
params.put("w", "200");
params.put("h", "300");
String url = UrlUtils.appendUrlParameters("http://wp.com/test", params);
assertEquals("http://wp.com/test?h=300&w=200", url);
if (!url.equals("http://wp.com/test?h=300&w=200") && !url.equals("http://wp.com/test?w=200&h=300")) {
assertTrue("failed test on url: " + url, false);
}
}

public void testAppendUrlParameters2() {
Map<String, String> params = new HashMap<>();
params.put("h", "300");
params.put("w", "200");
String url = UrlUtils.appendUrlParameters("/relative/test", params);
assertEquals("/relative/test?h=300&w=200", url);
if (!url.equals("/relative/test?h=300&w=200") && !url.equals("/relative/test?w=200&h=300")) {
assertTrue("failed test on url: " + url, false);
}
}
}

0 comments on commit b465a2e

Please sign in to comment.