use of org.apache.tomcat.unittest.TesterResponse in project tomcat by apache.
the class TestResponseUtil method testAddValidWithPartiallyValidSingleHeaderAlreadyPresent.
@Test
public void testAddValidWithPartiallyValidSingleHeaderAlreadyPresent() {
TesterResponse response = new TesterResponse();
response.getCoyoteResponse();
response.addHeader("vary", "{{{, bar");
List<String> expected = new ArrayList<>();
expected.add("bar");
doTestAddVaryFieldName(response, "bar", expected);
}
use of org.apache.tomcat.unittest.TesterResponse in project tomcat by apache.
the class TestResponseUtil method testAddValidWithPartiallyValidSingleHeaderIncludingAll.
@Test
public void testAddValidWithPartiallyValidSingleHeaderIncludingAll() {
TesterResponse response = new TesterResponse();
response.getCoyoteResponse();
response.addHeader("vary", "{{{, *");
List<String> expected = new ArrayList<>();
expected.add("*");
doTestAddVaryFieldName(response, "too", expected);
}
use of org.apache.tomcat.unittest.TesterResponse in project tomcat by apache.
the class TestResponseUtil method testAddValidWithValidHeadersAlreadyPresent.
@Test
public void testAddValidWithValidHeadersAlreadyPresent() {
TesterResponse response = new TesterResponse();
response.getCoyoteResponse();
response.addHeader("vary", "foo");
response.addHeader("vary", "bar");
List<String> expected = new ArrayList<>();
expected.add("foo");
expected.add("bar");
doTestAddVaryFieldName(response, "foo", expected);
}
use of org.apache.tomcat.unittest.TesterResponse in project tomcat by apache.
the class TestResponseUtil method testAddValidWithValidSingleHeaderIncludingAll.
@Test
public void testAddValidWithValidSingleHeaderIncludingAll() {
TesterResponse response = new TesterResponse();
response.getCoyoteResponse();
response.addHeader("vary", "foo, *");
List<String> expected = new ArrayList<>();
expected.add("*");
doTestAddVaryFieldName(response, "too", expected);
}
use of org.apache.tomcat.unittest.TesterResponse in project tomcat by apache.
the class TestResponseUtil method testAddValidWithAll.
@Test
public void testAddValidWithAll() {
TesterResponse response = new TesterResponse();
response.getCoyoteResponse();
response.addHeader("vary", "host");
List<String> expected = new ArrayList<>();
expected.add("*");
doTestAddVaryFieldName(response, "*", expected);
}
Aggregations