ParseQS and Global made into packages
This commit is contained in:
24
src/test/java/com/github/nkzawa/global/GlobalTest.java
Normal file
24
src/test/java/com/github/nkzawa/global/GlobalTest.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package com.github.nkzawa.global;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class GlobalTest {
|
||||
|
||||
@Test
|
||||
public void encodeURIComponent() {
|
||||
assertThat(Global.encodeURIComponent(" ~'()! "), is("%20~'()!%20"));
|
||||
assertThat(Global.encodeURIComponent("+:;"), is("%2B%3A%3B"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void decodeURIComponent() {
|
||||
assertThat(Global.decodeURIComponent("%20%7E%27%28%29%21%20"), is(" ~'()! "));
|
||||
assertThat(Global.decodeURIComponent("%2B%3A%3B"), is("+:;"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user