hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r560358 [2/2] - in /jakarta/httpcomponents/httpcore/trunk/module-main/src: main/java/org/apache/http/impl/ main/java/org/apache/http/impl/entity/ main/java/org/apache/http/impl/io/ test/java/org/apache/http/impl/ test/java/org/apache/http/i...
Date Fri, 27 Jul 2007 19:30:44 GMT
Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/util/TestHeaderUtils.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/util/TestHeaderUtils.java?view=diff&rev=560358&r1=560357&r2=560358
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/util/TestHeaderUtils.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/util/TestHeaderUtils.java
Fri Jul 27 12:30:42 2007
@@ -39,7 +39,7 @@
 import org.apache.http.ProtocolException;
 import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.message.BufferedHeader;
-import org.apache.http.mockup.HttpDataReceiverMockup;
+import org.apache.http.mockup.SessionInputBufferMockup;
 
 import junit.framework.Test;
 import junit.framework.TestCase;
@@ -89,7 +89,7 @@
             "\t and even more stuff\r\n" +  
             "     \r\n" +  
             "\r\n"; 
-        SessionInputBuffer receiver = new HttpDataReceiverMockup(s, "US-ASCII"); 
+        SessionInputBuffer receiver = new SessionInputBufferMockup(s, "US-ASCII"); 
         Header[] headers = HeaderUtils.parseHeaders(receiver);
         assertNotNull(headers);
         assertEquals(3, headers.length);
@@ -112,7 +112,7 @@
         String s = 
             "header1  : stuff; param1 = value1; param2 = \"value 2\" \r\n" + 
             "\r\n"; 
-        SessionInputBuffer receiver = new HttpDataReceiverMockup(s, "US-ASCII"); 
+        SessionInputBuffer receiver = new SessionInputBufferMockup(s, "US-ASCII"); 
         Header[] headers = HeaderUtils.parseHeaders(receiver);
         assertNotNull(headers);
         assertEquals(1, headers.length);
@@ -135,7 +135,7 @@
         String s = "    stuff\r\n" + 
             "header1: stuff\r\n" + 
             "\r\n"; 
-        SessionInputBuffer receiver = new HttpDataReceiverMockup(s, "US-ASCII");
+        SessionInputBuffer receiver = new SessionInputBufferMockup(s, "US-ASCII");
         try {
             HeaderUtils.parseHeaders(receiver);
             fail("ProtocolException should have been thrown");
@@ -145,7 +145,7 @@
         s = "  :  stuff\r\n" + 
             "header1: stuff\r\n" + 
             "\r\n"; 
-        receiver = new HttpDataReceiverMockup(s, "US-ASCII");
+        receiver = new SessionInputBufferMockup(s, "US-ASCII");
         try {
             HeaderUtils.parseHeaders(receiver);
             fail("ProtocolException should have been thrown");
@@ -158,7 +158,7 @@
         String s = 
             "    header1: stuff\r\n" + 
             "header2  : stuff \r\n"; 
-        SessionInputBuffer receiver = new HttpDataReceiverMockup(s, "US-ASCII"); 
+        SessionInputBuffer receiver = new SessionInputBufferMockup(s, "US-ASCII"); 
         Header[] headers = HeaderUtils.parseHeaders(receiver);
         assertNotNull(headers);
         assertEquals(2, headers.length);
@@ -170,7 +170,7 @@
     
     public void testEmptyDataStream() throws Exception {
         String s = ""; 
-        SessionInputBuffer receiver = new HttpDataReceiverMockup(s, "US-ASCII"); 
+        SessionInputBuffer receiver = new SessionInputBufferMockup(s, "US-ASCII"); 
         Header[] headers = HeaderUtils.parseHeaders(receiver);
         assertNotNull(headers);
         assertEquals(0, headers.length);
@@ -182,7 +182,7 @@
             "header2: stuff \r\n" + 
             "header3: stuff\r\n" + 
             "\r\n"; 
-        SessionInputBuffer receiver = new HttpDataReceiverMockup(s, "US-ASCII");
+        SessionInputBuffer receiver = new SessionInputBufferMockup(s, "US-ASCII");
         try {
             HeaderUtils.parseHeaders(receiver, 2, -1);
             fail("IOException should have been thrown");
@@ -197,7 +197,7 @@
             " stuff \r\n" + 
             " stuff\r\n" + 
             "\r\n"; 
-        SessionInputBuffer receiver = new HttpDataReceiverMockup(s, "US-ASCII");
+        SessionInputBuffer receiver = new SessionInputBufferMockup(s, "US-ASCII");
         try {
             HeaderUtils.parseHeaders(receiver, 2, 15);
             fail("IOException should have been thrown");



Mime
View raw message