blob: a7cba4c03c83347c4563c6aad8f57d9a6857c5b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
package instrumentationTest.de.test.antennapod.util;
import android.test.AndroidTestCase;
import de.danoeh.antennapod.util.URIUtil;
/**
* Test class for URIUtil
*/
public class URIUtilTest extends AndroidTestCase {
public void testGetURIFromRequestUrlShouldNotEncode() {
final String testUrl = "http://example.com/this%20is%20encoded";
assertEquals(testUrl, URIUtil.getURIFromRequestUrl(testUrl).toString());
}
public void testGetURIFromRequestUrlShouldEncode() {
final String testUrl = "http://example.com/this is not encoded";
final String expected = "http://example.com/this%20is%20not%20encoded";
assertEquals(expected, URIUtil.getURIFromRequestUrl(testUrl).toString());
}
}
|