Add test case for HttpHeaders.equalsIgnoreCase(...)

This commit is contained in:
Trustin Lee 2013-11-28 18:24:03 +09:00
parent 313365cd5c
commit 14327706a3

View File

@ -20,6 +20,9 @@ import org.junit.Test;
import java.util.List;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
public class HttpHeadersTest {
@Test
@ -44,4 +47,12 @@ public class HttpHeadersTest {
Assert.assertEquals("1", values.get(0));
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));
}
}