Add test case for HttpHeaders.equalsIgnoreCase(...)
This commit is contained in:
parent
313365cd5c
commit
14327706a3
@ -20,6 +20,9 @@ import org.junit.Test;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import static org.hamcrest.CoreMatchers.is;
|
||||||
|
import static org.junit.Assert.assertThat;
|
||||||
|
|
||||||
public class HttpHeadersTest {
|
public class HttpHeadersTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -44,4 +47,12 @@ public class HttpHeadersTest {
|
|||||||
Assert.assertEquals("1", values.get(0));
|
Assert.assertEquals("1", values.get(0));
|
||||||
Assert.assertEquals("2", values.get(1));
|
Assert.assertEquals("2", values.get(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testEquansIgnoreCase() {
|
||||||
|
assertThat(HttpHeaders.equalsIgnoreCase(null, null), is(true));
|
||||||
|
assertThat(HttpHeaders.equalsIgnoreCase(null, "foo"), is(false));
|
||||||
|
assertThat(HttpHeaders.equalsIgnoreCase("bar", null), is(false));
|
||||||
|
assertThat(HttpHeaders.equalsIgnoreCase("FoO", "fOo"), is(true));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user