1 20 package org.apache.cactus.sample.servlet.unit; 21 22 import org.apache.cactus.FilterTestCase; 23 24 import com.meterware.httpunit.WebResponse; 25 26 31 public class TestFilterHttpHeaders extends FilterTestCase 32 { 33 37 public void testHeaders() 38 { 39 response.setHeader("xparevcount", "xparevcount"); 40 response.setHeader("xxparevcount", "xxparevcount"); 41 } 42 43 49 public void endHeaders(WebResponse theResponse) 50 { 51 String header1 = theResponse.getHeaderField("xxparevcount"); 52 String header2 = theResponse.getHeaderField("xparevcount"); 53 assertNotNull("Header 1 should not be null", header1); 54 assertNotNull("Header 2 should not be null", header2); 55 assertEquals("xxparevcount", header1); 56 assertEquals("xparevcount", header2); 57 } 58 59 } 60 | Popular Tags |