hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1101465 - in /httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl: ./ entity/ io/
Date Tue, 10 May 2011 13:56:22 GMT
Author: olegk
Date: Tue May 10 13:56:21 2011
New Revision: 1101465

URL: http://svn.apache.org/viewvc?rev=1101465&view=rev
Log:
Test case restructuring

Added:
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/SessionInputBufferMock.java
      - copied, changed from r1101461, httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/SessionInputBufferMockup.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/SessionOutputBufferMock.java
      - copied, changed from r1101461, httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/SessionOutputBufferMockup.java
Removed:
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/SessionInputBufferMockup.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/SessionOutputBufferMockup.java
Modified:
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/TestSessionBuffers.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/entity/TestEntityDeserializer.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/entity/TestEntitySerializer.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestChunkCoding.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestContentLengthInputStream.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestContentLengthOutputStream.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestIdentityInputStream.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestIdentityOutputStream.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestMessageParser.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestRequestParser.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestResponseParser.java

Copied: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/SessionInputBufferMock.java (from r1101461, httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/SessionInputBufferMockup.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/SessionInputBufferMock.java?p2=httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/SessionInputBufferMock.java&p1=httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/SessionInputBufferMockup.java&r1=1101461&r2=1101465&rev=1101465&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/SessionInputBufferMockup.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/SessionInputBufferMock.java Tue May 10 13:56:21 2011
@@ -39,11 +39,11 @@ import org.apache.http.params.HttpParams
 /**
  * {@link org.apache.http.io.SessionInputBuffer} mockup implementation.
  */
-public class SessionInputBufferMockup extends AbstractSessionInputBuffer {
+public class SessionInputBufferMock extends AbstractSessionInputBuffer {
 
     public static final int BUFFER_SIZE = 16;
 
-    public SessionInputBufferMockup(
+    public SessionInputBufferMock(
             final InputStream instream,
             int buffersize,
             final HttpParams params) {
@@ -51,37 +51,37 @@ public class SessionInputBufferMockup ex
         init(instream, buffersize, params);
     }
 
-    public SessionInputBufferMockup(
+    public SessionInputBufferMock(
             final InputStream instream,
             int buffersize) {
         this(instream, buffersize, new BasicHttpParams());
     }
 
-    public SessionInputBufferMockup(
+    public SessionInputBufferMock(
             final byte[] bytes,
             final HttpParams params) {
         this(bytes, BUFFER_SIZE, params);
     }
 
-    public SessionInputBufferMockup(
+    public SessionInputBufferMock(
             final byte[] bytes) {
         this(bytes, BUFFER_SIZE, new BasicHttpParams());
     }
 
-    public SessionInputBufferMockup(
+    public SessionInputBufferMock(
             final byte[] bytes,
             int buffersize,
             final HttpParams params) {
         this(new ByteArrayInputStream(bytes), buffersize, params);
     }
 
-    public SessionInputBufferMockup(
+    public SessionInputBufferMock(
             final byte[] bytes,
             int buffersize) {
         this(new ByteArrayInputStream(bytes), buffersize, new BasicHttpParams());
     }
 
-    public SessionInputBufferMockup(
+    public SessionInputBufferMock(
             final String s,
             final String charset,
             int buffersize,
@@ -90,7 +90,7 @@ public class SessionInputBufferMockup ex
         this(s.getBytes(charset), buffersize, params);
     }
 
-    public SessionInputBufferMockup(
+    public SessionInputBufferMock(
             final String s,
             final String charset,
             int buffersize)
@@ -98,7 +98,7 @@ public class SessionInputBufferMockup ex
         this(s.getBytes(charset), buffersize, new BasicHttpParams());
     }
 
-    public SessionInputBufferMockup(
+    public SessionInputBufferMock(
             final String s,
             final String charset,
             final HttpParams params)
@@ -106,7 +106,7 @@ public class SessionInputBufferMockup ex
         this(s.getBytes(charset), params);
     }
 
-    public SessionInputBufferMockup(
+    public SessionInputBufferMock(
             final String s,
             final String charset)
         throws UnsupportedEncodingException {

Copied: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/SessionOutputBufferMock.java (from r1101461, httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/SessionOutputBufferMockup.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/SessionOutputBufferMock.java?p2=httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/SessionOutputBufferMock.java&p1=httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/SessionOutputBufferMockup.java&r1=1101461&r2=1101465&rev=1101465&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/SessionOutputBufferMockup.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/SessionOutputBufferMock.java Tue May 10 13:56:21 2011
@@ -38,12 +38,12 @@ import org.apache.http.params.HttpParams
  * {@link org.apache.http.io.SessionOutputBuffer} mockup implementation.
  *
  */
-public class SessionOutputBufferMockup extends AbstractSessionOutputBuffer {
+public class SessionOutputBufferMock extends AbstractSessionOutputBuffer {
 
     private ByteArrayOutputStream buffer = new ByteArrayOutputStream();
     public static final int BUFFER_SIZE = 16;
 
-    public SessionOutputBufferMockup(
+    public SessionOutputBufferMock(
             final OutputStream outstream,
             int buffersize,
             final HttpParams params) {
@@ -51,30 +51,30 @@ public class SessionOutputBufferMockup e
         init(outstream, buffersize, params);
     }
 
-    public SessionOutputBufferMockup(
+    public SessionOutputBufferMock(
             final OutputStream outstream,
             int buffersize) {
         this(outstream, buffersize, new BasicHttpParams());
     }
 
-    public SessionOutputBufferMockup(
+    public SessionOutputBufferMock(
             final ByteArrayOutputStream buffer,
             final HttpParams params) {
         this(buffer, BUFFER_SIZE, params);
         this.buffer = buffer;
     }
 
-    public SessionOutputBufferMockup(
+    public SessionOutputBufferMock(
             final ByteArrayOutputStream buffer) {
         this(buffer, BUFFER_SIZE, new BasicHttpParams());
         this.buffer = buffer;
     }
 
-    public SessionOutputBufferMockup(final HttpParams params) {
+    public SessionOutputBufferMock(final HttpParams params) {
         this(new ByteArrayOutputStream(), params);
     }
 
-    public SessionOutputBufferMockup() {
+    public SessionOutputBufferMock() {
         this(new ByteArrayOutputStream(), new BasicHttpParams());
     }
 

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/TestSessionBuffers.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/TestSessionBuffers.java?rev=1101465&r1=1101464&r2=1101465&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/TestSessionBuffers.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/TestSessionBuffers.java Tue May 10 13:56:21 2011
@@ -47,41 +47,41 @@ public class TestSessionBuffers {
     @Test
     public void testInit() throws Exception {
         ByteArrayOutputStream out = new ByteArrayOutputStream();
-        new SessionOutputBufferMockup(out);
+        new SessionOutputBufferMock(out);
         try {
-            new SessionOutputBufferMockup(null, new BasicHttpParams());
+            new SessionOutputBufferMock(null, new BasicHttpParams());
             Assert.fail("IllegalArgumentException should have been thrown");
         } catch (IllegalArgumentException ex) {
             //expected
         }
         try {
-            new SessionOutputBufferMockup(out, null);
+            new SessionOutputBufferMock(out, null);
             Assert.fail("IllegalArgumentException should have been thrown");
         } catch (IllegalArgumentException ex) {
             //expected
         }
         ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
-        new SessionInputBufferMockup(in, 10);
+        new SessionInputBufferMock(in, 10);
         try {
-            new SessionInputBufferMockup(in, -10);
+            new SessionInputBufferMock(in, -10);
             Assert.fail("IllegalArgumentException should have been thrown");
         } catch (IllegalArgumentException ex) {
             //expected
         }
         try {
-            new SessionOutputBufferMockup(out, -10);
+            new SessionOutputBufferMock(out, -10);
             Assert.fail("IllegalArgumentException should have been thrown");
         } catch (IllegalArgumentException ex) {
             //expected
         }
         try {
-            new SessionInputBufferMockup((InputStream)null, 1024);
+            new SessionInputBufferMock((InputStream)null, 1024);
             Assert.fail("IllegalArgumentException should have been thrown");
         } catch (IllegalArgumentException ex) {
             //expected
         }
         try {
-            new SessionInputBufferMockup(in, 10, null);
+            new SessionInputBufferMock(in, 10, null);
             Assert.fail("IllegalArgumentException should have been thrown");
         } catch (IllegalArgumentException ex) {
             //expected
@@ -90,20 +90,20 @@ public class TestSessionBuffers {
 
     @Test
     public void testBasicBufferProperties() throws Exception {
-        SessionInputBufferMockup inbuffer = new SessionInputBufferMockup(new byte[] { 1, 2 , 3});
-        Assert.assertEquals(SessionInputBufferMockup.BUFFER_SIZE, inbuffer.capacity());
-        Assert.assertEquals(SessionInputBufferMockup.BUFFER_SIZE, inbuffer.available());
+        SessionInputBufferMock inbuffer = new SessionInputBufferMock(new byte[] { 1, 2 , 3});
+        Assert.assertEquals(SessionInputBufferMock.BUFFER_SIZE, inbuffer.capacity());
+        Assert.assertEquals(SessionInputBufferMock.BUFFER_SIZE, inbuffer.available());
         Assert.assertEquals(0, inbuffer.length());
         inbuffer.read();
-        Assert.assertEquals(SessionInputBufferMockup.BUFFER_SIZE - 2, inbuffer.available());
+        Assert.assertEquals(SessionInputBufferMock.BUFFER_SIZE - 2, inbuffer.available());
         Assert.assertEquals(2, inbuffer.length());
 
-        SessionOutputBufferMockup outbuffer = new SessionOutputBufferMockup();
-        Assert.assertEquals(SessionOutputBufferMockup.BUFFER_SIZE, outbuffer.capacity());
-        Assert.assertEquals(SessionOutputBufferMockup.BUFFER_SIZE, outbuffer.available());
+        SessionOutputBufferMock outbuffer = new SessionOutputBufferMock();
+        Assert.assertEquals(SessionOutputBufferMock.BUFFER_SIZE, outbuffer.capacity());
+        Assert.assertEquals(SessionOutputBufferMock.BUFFER_SIZE, outbuffer.available());
         Assert.assertEquals(0, outbuffer.length());
         outbuffer.write(new byte[] {1, 2, 3});
-        Assert.assertEquals(SessionOutputBufferMockup.BUFFER_SIZE - 3, outbuffer.available());
+        Assert.assertEquals(SessionOutputBufferMock.BUFFER_SIZE - 3, outbuffer.available());
         Assert.assertEquals(3, outbuffer.length());
     }
 
@@ -124,7 +124,7 @@ public class TestSessionBuffers {
         teststrs[4] = "And goodbye";
 
         CharArrayBuffer chbuffer = new CharArrayBuffer(16);
-        SessionOutputBufferMockup outbuffer = new SessionOutputBufferMockup();
+        SessionOutputBufferMock outbuffer = new SessionOutputBufferMock();
         for (int i = 0; i < teststrs.length; i++) {
             chbuffer.clear();
             chbuffer.append(teststrs[i]);
@@ -143,7 +143,7 @@ public class TestSessionBuffers {
         }
         Assert.assertEquals(expected, bytesWritten);
 
-        SessionInputBufferMockup inbuffer = new SessionInputBufferMockup(
+        SessionInputBufferMock inbuffer = new SessionInputBufferMock(
                 outbuffer.getData());
 
         for (int i = 0; i < teststrs.length; i++) {
@@ -159,7 +159,7 @@ public class TestSessionBuffers {
 
     @Test
     public void testComplexReadWriteLine() throws Exception {
-        SessionOutputBufferMockup outbuffer = new SessionOutputBufferMockup();
+        SessionOutputBufferMock outbuffer = new SessionOutputBufferMock();
         outbuffer.write(new byte[] {'a', '\n'});
         outbuffer.write(new byte[] {'\r', '\n'});
         outbuffer.write(new byte[] {'\r', '\r', '\n'});
@@ -211,7 +211,7 @@ public class TestSessionBuffers {
         bytesWritten = outbuffer.getMetrics().getBytesTransferred();
         Assert.assertEquals(8 + 14 + 2 + 15 + 2 + 16 + 2 + 1, bytesWritten);
 
-        SessionInputBufferMockup inbuffer = new SessionInputBufferMockup(
+        SessionInputBufferMock inbuffer = new SessionInputBufferMock(
                 outbuffer.getData());
 
         Assert.assertEquals("a", inbuffer.readLine());
@@ -245,7 +245,7 @@ public class TestSessionBuffers {
         teststrs[4] = "And goodbye";
 
         CharArrayBuffer chbuffer = new CharArrayBuffer(16);
-        SessionOutputBufferMockup outbuffer = new SessionOutputBufferMockup();
+        SessionOutputBufferMock outbuffer = new SessionOutputBufferMock();
         for (int i = 0; i < teststrs.length; i++) {
             chbuffer.clear();
             chbuffer.append(teststrs[i]);
@@ -263,7 +263,7 @@ public class TestSessionBuffers {
         }
         Assert.assertEquals(expected, bytesWritten);
 
-        SessionInputBufferMockup inbuffer = new SessionInputBufferMockup(
+        SessionInputBufferMock inbuffer = new SessionInputBufferMock(
                 outbuffer.getData(), 1024);
 
         for (int i = 0; i < teststrs.length; i++) {
@@ -282,7 +282,7 @@ public class TestSessionBuffers {
         for (int i = 0; i < out.length; i++) {
             out[i] = (byte)('0' + i);
         }
-        SessionOutputBufferMockup outbuffer = new SessionOutputBufferMockup();
+        SessionOutputBufferMock outbuffer = new SessionOutputBufferMock();
         int off = 0;
         int remaining = out.length;
         while (remaining > 0) {
@@ -304,7 +304,7 @@ public class TestSessionBuffers {
             Assert.assertEquals(out[i], tmp[i]);
         }
 
-        SessionInputBufferMockup inbuffer = new SessionInputBufferMockup(tmp);
+        SessionInputBufferMock inbuffer = new SessionInputBufferMock(tmp);
 
         // these read operations will have no effect
         Assert.assertEquals(0, inbuffer.read(null, 0, 10));
@@ -343,7 +343,7 @@ public class TestSessionBuffers {
         for (int i = 0; i < out.length; i++) {
             out[i] = (byte)(120 + i);
         }
-        SessionOutputBufferMockup outbuffer = new SessionOutputBufferMockup();
+        SessionOutputBufferMock outbuffer = new SessionOutputBufferMock();
         for (int i = 0; i < out.length; i++) {
             outbuffer.write(out[i]);
         }
@@ -357,7 +357,7 @@ public class TestSessionBuffers {
             Assert.assertEquals(out[i], tmp[i]);
         }
 
-        SessionInputBufferMockup inbuffer = new SessionInputBufferMockup(tmp);
+        SessionInputBufferMock inbuffer = new SessionInputBufferMock(tmp);
         byte[] in = new byte[40];
         for (int i = 0; i < in.length; i++) {
             in[i] = (byte)inbuffer.read();
@@ -378,14 +378,14 @@ public class TestSessionBuffers {
         byte[] tmp = s.getBytes("US-ASCII");
         // no limit
         params.setIntParameter(CoreConnectionPNames.MAX_LINE_LENGTH, 0);
-        SessionInputBufferMockup inbuffer1 = new SessionInputBufferMockup(tmp, 5, params);
+        SessionInputBufferMock inbuffer1 = new SessionInputBufferMock(tmp, 5, params);
         Assert.assertNotNull(inbuffer1.readLine());
         long bytesRead = inbuffer1.getMetrics().getBytesTransferred();
         Assert.assertEquals(60, bytesRead);
 
         // 15 char limit
         params.setIntParameter(CoreConnectionPNames.MAX_LINE_LENGTH, 15);
-        SessionInputBufferMockup inbuffer2 = new SessionInputBufferMockup(tmp, 5, params);
+        SessionInputBufferMock inbuffer2 = new SessionInputBufferMock(tmp, 5, params);
         try {
             inbuffer2.readLine();
             Assert.fail("IOException should have been thrown");
@@ -424,7 +424,7 @@ public class TestSessionBuffers {
         HttpParams params = new BasicHttpParams();
         HttpProtocolParams.setHttpElementCharset(params, "UTF-8");
 
-        SessionOutputBufferMockup outbuffer = new SessionOutputBufferMockup(params);
+        SessionOutputBufferMock outbuffer = new SessionOutputBufferMock(params);
 
         CharArrayBuffer chbuffer = new CharArrayBuffer(16);
         for (int i = 0; i < 10; i++) {
@@ -445,7 +445,7 @@ public class TestSessionBuffers {
                 (s3.getBytes("UTF-8").length + 2)) * 10;
         Assert.assertEquals(expected, bytesWritten);
 
-        SessionInputBufferMockup inbuffer = new SessionInputBufferMockup(
+        SessionInputBufferMock inbuffer = new SessionInputBufferMock(
                 outbuffer.getData(), params);
 
         for (int i = 0; i < 10; i++) {
@@ -473,14 +473,14 @@ public class TestSessionBuffers {
         HttpParams params = new BasicHttpParams();
         HttpProtocolParams.setHttpElementCharset(params, "UTF-8");
 
-        SessionOutputBufferMockup outbuffer = new SessionOutputBufferMockup(params);
+        SessionOutputBufferMock outbuffer = new SessionOutputBufferMock(params);
 
         CharArrayBuffer chbuffer = new CharArrayBuffer(16);
         chbuffer.append(s);
         outbuffer.writeLine(chbuffer);
         outbuffer.flush();
 
-        SessionInputBufferMockup inbuffer = new SessionInputBufferMockup(
+        SessionInputBufferMock inbuffer = new SessionInputBufferMock(
                 outbuffer.getData(), params);
 
         Assert.assertEquals(s, inbuffer.readLine());
@@ -493,7 +493,7 @@ public class TestSessionBuffers {
         HttpParams params = new BasicHttpParams();
         HttpProtocolParams.setHttpElementCharset(params, HTTP.ISO_8859_1);
 
-        SessionOutputBufferMockup outbuffer = new SessionOutputBufferMockup(params);
+        SessionOutputBufferMock outbuffer = new SessionOutputBufferMock(params);
 
         CharArrayBuffer chbuffer = new CharArrayBuffer(16);
         for (int i = 0; i < 5; i++) {
@@ -509,7 +509,7 @@ public class TestSessionBuffers {
         long expected = ((s1.toString().getBytes(HTTP.ISO_8859_1).length + 2)) * 10;
         Assert.assertEquals(expected, bytesWritten);
 
-        SessionInputBufferMockup inbuffer = new SessionInputBufferMockup(
+        SessionInputBufferMock inbuffer = new SessionInputBufferMock(
                 outbuffer.getData(),
                 params);
         HttpProtocolParams.setHttpElementCharset(params, HTTP.ISO_8859_1);
@@ -528,7 +528,7 @@ public class TestSessionBuffers {
 
     @Test
     public void testInvalidCharArrayBuffer() throws Exception {
-        SessionInputBufferMockup inbuffer = new SessionInputBufferMockup(new byte[] {});
+        SessionInputBufferMock inbuffer = new SessionInputBufferMock(new byte[] {});
         try {
             inbuffer.readLine(null);
             Assert.fail("IllegalArgumentException should have been thrown");

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/entity/TestEntityDeserializer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/entity/TestEntityDeserializer.java?rev=1101465&r1=1101464&r2=1101465&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/entity/TestEntityDeserializer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/entity/TestEntityDeserializer.java Tue May 10 13:56:21 2011
@@ -32,7 +32,7 @@ import java.io.InputStream;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpMessage;
 import org.apache.http.ProtocolException;
-import org.apache.http.impl.SessionInputBufferMockup;
+import org.apache.http.impl.SessionInputBufferMock;
 import org.apache.http.impl.io.ChunkedInputStream;
 import org.apache.http.impl.io.ContentLengthInputStream;
 import org.apache.http.impl.io.IdentityInputStream;
@@ -54,7 +54,7 @@ public class TestEntityDeserializer {
             // expected
         }
         try {
-            entitygen.deserialize(new SessionInputBufferMockup(new byte[] {}) , null);
+            entitygen.deserialize(new SessionInputBufferMock(new byte[] {}) , null);
             Assert.fail("IllegalArgumentException should have been thrown");
         } catch (IllegalArgumentException ex) {
             // expected
@@ -63,7 +63,7 @@ public class TestEntityDeserializer {
 
     @Test
     public void testEntityWithTransferEncoding() throws Exception {
-        SessionInputBuffer datareceiver = new SessionInputBufferMockup("0\r\n", "US-ASCII");
+        SessionInputBuffer inbuffer = new SessionInputBufferMock("0\r\n", "US-ASCII");
         HttpMessage message = new DummyHttpMessage();
 
         // lenient mode
@@ -73,7 +73,7 @@ public class TestEntityDeserializer {
         message.addHeader("Content-Length", "plain wrong");
         EntityDeserializer entitygen = new EntityDeserializer(
                 new LaxContentLengthStrategy());
-        HttpEntity entity = entitygen.deserialize(datareceiver, message);
+        HttpEntity entity = entitygen.deserialize(inbuffer, message);
         Assert.assertNotNull(entity);
         Assert.assertEquals(-1, entity.getContentLength());
         Assert.assertTrue(entity.isChunked());
@@ -81,7 +81,7 @@ public class TestEntityDeserializer {
 
         // strict mode
         message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, true);
-        entity = entitygen.deserialize(datareceiver, message);
+        entity = entitygen.deserialize(inbuffer, message);
         Assert.assertNotNull(entity);
         Assert.assertEquals(-1, entity.getContentLength());
         Assert.assertTrue(entity.isChunked());
@@ -90,8 +90,8 @@ public class TestEntityDeserializer {
 
     @Test
     public void testEntityWithIdentityTransferEncoding() throws Exception {
-        SessionInputBuffer datareceiver =
-            new SessionInputBufferMockup(new byte[] {});
+        SessionInputBuffer inbuffer =
+            new SessionInputBufferMock(new byte[] {});
         HttpMessage message = new DummyHttpMessage();
 
         // lenient mode
@@ -101,7 +101,7 @@ public class TestEntityDeserializer {
         message.addHeader("Content-Length", "plain wrong");
         EntityDeserializer entitygen = new EntityDeserializer(
                 new LaxContentLengthStrategy());
-        HttpEntity entity = entitygen.deserialize(datareceiver, message);
+        HttpEntity entity = entitygen.deserialize(inbuffer, message);
         Assert.assertNotNull(entity);
         Assert.assertEquals(-1, entity.getContentLength());
         Assert.assertFalse(entity.isChunked());
@@ -109,7 +109,7 @@ public class TestEntityDeserializer {
 
     @Test
     public void testEntityWithUnsupportedTransferEncoding() throws Exception {
-        SessionInputBuffer datareceiver = new SessionInputBufferMockup("0\r\n", "US-ASCII");
+        SessionInputBuffer inbuffer = new SessionInputBufferMock("0\r\n", "US-ASCII");
         HttpMessage message = new DummyHttpMessage();
 
         // lenient mode
@@ -119,7 +119,7 @@ public class TestEntityDeserializer {
         message.addHeader("Content-Length", "plain wrong");
         EntityDeserializer entitygen = new EntityDeserializer(
                 new LaxContentLengthStrategy());
-        HttpEntity entity = entitygen.deserialize(datareceiver, message);
+        HttpEntity entity = entitygen.deserialize(inbuffer, message);
         Assert.assertNotNull(entity);
         Assert.assertEquals(-1, entity.getContentLength());
         Assert.assertTrue(entity.isChunked());
@@ -128,7 +128,7 @@ public class TestEntityDeserializer {
         // strict mode
         message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, true);
         try {
-            entitygen.deserialize(datareceiver, message);
+            entitygen.deserialize(inbuffer, message);
             Assert.fail("ProtocolException should have been thrown");
         } catch (ProtocolException ex) {
             // expected
@@ -137,7 +137,7 @@ public class TestEntityDeserializer {
 
     @Test
     public void testChunkedTransferEncodingMustBeLast() throws Exception {
-        SessionInputBuffer datareceiver = new SessionInputBufferMockup("0\r\n", "US-ASCII");
+        SessionInputBuffer inbuffer = new SessionInputBufferMock("0\r\n", "US-ASCII");
         HttpMessage message = new DummyHttpMessage();
 
         // lenient mode
@@ -147,7 +147,7 @@ public class TestEntityDeserializer {
         message.addHeader("Content-Length", "plain wrong");
         EntityDeserializer entitygen = new EntityDeserializer(
                 new LaxContentLengthStrategy());
-        HttpEntity entity = entitygen.deserialize(datareceiver, message);
+        HttpEntity entity = entitygen.deserialize(inbuffer, message);
         Assert.assertNotNull(entity);
         Assert.assertEquals(-1, entity.getContentLength());
         Assert.assertFalse(entity.isChunked());
@@ -156,7 +156,7 @@ public class TestEntityDeserializer {
         // strict mode
         message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, true);
         try {
-            entitygen.deserialize(datareceiver, message);
+            entitygen.deserialize(inbuffer, message);
             Assert.fail("ProtocolException should have been thrown");
         } catch (ProtocolException ex) {
             // expected
@@ -165,7 +165,7 @@ public class TestEntityDeserializer {
 
     @Test
     public void testEntityWithContentLength() throws Exception {
-        SessionInputBuffer datareceiver = new SessionInputBufferMockup(new byte[] {});
+        SessionInputBuffer inbuffer = new SessionInputBufferMock(new byte[] {});
         HttpMessage message = new DummyHttpMessage();
 
         // lenient mode
@@ -174,7 +174,7 @@ public class TestEntityDeserializer {
         message.addHeader("Content-Length", "0");
         EntityDeserializer entitygen = new EntityDeserializer(
                 new LaxContentLengthStrategy());
-        HttpEntity entity = entitygen.deserialize(datareceiver, message);
+        HttpEntity entity = entitygen.deserialize(inbuffer, message);
         Assert.assertNotNull(entity);
         Assert.assertEquals(0, entity.getContentLength());
         Assert.assertFalse(entity.isChunked());
@@ -183,7 +183,7 @@ public class TestEntityDeserializer {
 
     @Test
     public void testEntityWithMultipleContentLength() throws Exception {
-        SessionInputBuffer datareceiver = new SessionInputBufferMockup(new byte[] {'0'});
+        SessionInputBuffer inbuffer = new SessionInputBufferMock(new byte[] {'0'});
         HttpMessage message = new DummyHttpMessage();
 
         // lenient mode
@@ -194,7 +194,7 @@ public class TestEntityDeserializer {
         message.addHeader("Content-Length", "1");
         EntityDeserializer entitygen = new EntityDeserializer(
                 new LaxContentLengthStrategy());
-        HttpEntity entity = entitygen.deserialize(datareceiver, message);
+        HttpEntity entity = entitygen.deserialize(inbuffer, message);
         Assert.assertNotNull(entity);
         Assert.assertEquals(1, entity.getContentLength());
         Assert.assertFalse(entity.isChunked());
@@ -205,7 +205,7 @@ public class TestEntityDeserializer {
         // strict mode
         message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, true);
         try {
-            entitygen.deserialize(datareceiver, message);
+            entitygen.deserialize(inbuffer, message);
             Assert.fail("ProtocolException should have been thrown");
         } catch (ProtocolException ex) {
             // expected
@@ -214,7 +214,7 @@ public class TestEntityDeserializer {
 
     @Test
     public void testEntityWithMultipleContentLengthSomeWrong() throws Exception {
-        SessionInputBuffer datareceiver = new SessionInputBufferMockup(new byte[] {'0'});
+        SessionInputBuffer inbuffer = new SessionInputBufferMock(new byte[] {'0'});
         HttpMessage message = new DummyHttpMessage();
 
         // lenient mode
@@ -225,7 +225,7 @@ public class TestEntityDeserializer {
         message.addHeader("Content-Length", "xxx");
         EntityDeserializer entitygen = new EntityDeserializer(
                 new LaxContentLengthStrategy());
-        HttpEntity entity = entitygen.deserialize(datareceiver, message);
+        HttpEntity entity = entitygen.deserialize(inbuffer, message);
         Assert.assertNotNull(entity);
         Assert.assertEquals(1, entity.getContentLength());
         Assert.assertFalse(entity.isChunked());
@@ -236,7 +236,7 @@ public class TestEntityDeserializer {
         // strict mode
         message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, true);
         try {
-            entitygen.deserialize(datareceiver, message);
+            entitygen.deserialize(inbuffer, message);
             Assert.fail("ProtocolException should have been thrown");
         } catch (ProtocolException ex) {
             // expected
@@ -245,7 +245,7 @@ public class TestEntityDeserializer {
 
     @Test
     public void testEntityWithMultipleContentLengthAllWrong() throws Exception {
-        SessionInputBuffer datareceiver = new SessionInputBufferMockup(new byte[] {'0'});
+        SessionInputBuffer inbuffer = new SessionInputBufferMock(new byte[] {'0'});
         HttpMessage message = new DummyHttpMessage();
 
         // lenient mode
@@ -255,7 +255,7 @@ public class TestEntityDeserializer {
         message.addHeader("Content-Length", "xxx");
         EntityDeserializer entitygen = new EntityDeserializer(
                 new LaxContentLengthStrategy());
-        HttpEntity entity = entitygen.deserialize(datareceiver, message);
+        HttpEntity entity = entitygen.deserialize(inbuffer, message);
         Assert.assertNotNull(entity);
         Assert.assertEquals(-1, entity.getContentLength());
         Assert.assertFalse(entity.isChunked());
@@ -267,7 +267,7 @@ public class TestEntityDeserializer {
         // strict mode
         message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, true);
         try {
-            entitygen.deserialize(datareceiver, message);
+            entitygen.deserialize(inbuffer, message);
             Assert.fail("ProtocolException should have been thrown");
         } catch (ProtocolException ex) {
             // expected
@@ -276,7 +276,7 @@ public class TestEntityDeserializer {
 
     @Test
     public void testEntityWithInvalidContentLength() throws Exception {
-        SessionInputBuffer datareceiver = new SessionInputBufferMockup(new byte[] {'0'});
+        SessionInputBuffer inbuffer = new SessionInputBufferMock(new byte[] {'0'});
         HttpMessage message = new DummyHttpMessage();
 
         // lenient mode
@@ -285,7 +285,7 @@ public class TestEntityDeserializer {
         message.addHeader("Content-Length", "xxx");
         EntityDeserializer entitygen = new EntityDeserializer(
                 new LaxContentLengthStrategy());
-        HttpEntity entity = entitygen.deserialize(datareceiver, message);
+        HttpEntity entity = entitygen.deserialize(inbuffer, message);
         Assert.assertNotNull(entity);
         Assert.assertEquals(-1, entity.getContentLength());
         Assert.assertFalse(entity.isChunked());
@@ -297,7 +297,7 @@ public class TestEntityDeserializer {
         // strict mode
         message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, true);
         try {
-            entitygen.deserialize(datareceiver, message);
+            entitygen.deserialize(inbuffer, message);
             Assert.fail("ProtocolException should have been thrown");
         } catch (ProtocolException ex) {
             // expected
@@ -306,14 +306,14 @@ public class TestEntityDeserializer {
 
     @Test
     public void testEntityNeitherContentLengthNorTransferEncoding() throws Exception {
-        SessionInputBuffer datareceiver = new SessionInputBufferMockup(new byte[] {'0'});
+        SessionInputBuffer inbuffer = new SessionInputBufferMock(new byte[] {'0'});
         HttpMessage message = new DummyHttpMessage();
 
         // lenient mode
         message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, false);
         EntityDeserializer entitygen = new EntityDeserializer(
                 new LaxContentLengthStrategy());
-        HttpEntity entity = entitygen.deserialize(datareceiver, message);
+        HttpEntity entity = entitygen.deserialize(inbuffer, message);
         Assert.assertNotNull(entity);
         Assert.assertEquals(-1, entity.getContentLength());
         Assert.assertFalse(entity.isChunked());
@@ -326,13 +326,13 @@ public class TestEntityDeserializer {
 
     @Test
     public void testEntityContentType() throws Exception {
-        SessionInputBuffer datareceiver = new SessionInputBufferMockup(new byte[] {'0'});
+        SessionInputBuffer inbuffer = new SessionInputBufferMock(new byte[] {'0'});
         HttpMessage message = new DummyHttpMessage();
 
         message.addHeader("Content-Type", "stuff");
         EntityDeserializer entitygen = new EntityDeserializer(
                 new LaxContentLengthStrategy());
-        HttpEntity entity = entitygen.deserialize(datareceiver, message);
+        HttpEntity entity = entitygen.deserialize(inbuffer, message);
         Assert.assertNotNull(entity);
         Assert.assertNotNull(entity.getContentType());
         Assert.assertEquals("stuff", entity.getContentType().getValue());
@@ -340,13 +340,13 @@ public class TestEntityDeserializer {
 
     @Test
     public void testEntityContentEncoding() throws Exception {
-        SessionInputBuffer datareceiver = new SessionInputBufferMockup(new byte[] {'0'});
+        SessionInputBuffer inbuffer = new SessionInputBufferMock(new byte[] {'0'});
         HttpMessage message = new DummyHttpMessage();
 
         message.addHeader("Content-Encoding", "what not");
         EntityDeserializer entitygen = new EntityDeserializer(
                 new LaxContentLengthStrategy());
-        HttpEntity entity = entitygen.deserialize(datareceiver, message);
+        HttpEntity entity = entitygen.deserialize(inbuffer, message);
         Assert.assertNotNull(entity);
         Assert.assertNotNull(entity.getContentEncoding());
         Assert.assertEquals("what not", entity.getContentEncoding().getValue());

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/entity/TestEntitySerializer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/entity/TestEntitySerializer.java?rev=1101465&r1=1101464&r2=1101465&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/entity/TestEntitySerializer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/entity/TestEntitySerializer.java Tue May 10 13:56:21 2011
@@ -33,7 +33,7 @@ import org.apache.http.HttpMessage;
 import org.apache.http.HttpVersion;
 import org.apache.http.ProtocolException;
 import org.apache.http.entity.ByteArrayEntity;
-import org.apache.http.impl.SessionOutputBufferMockup;
+import org.apache.http.impl.SessionOutputBufferMock;
 import org.apache.http.impl.io.ChunkedOutputStream;
 import org.apache.http.impl.io.ContentLengthOutputStream;
 import org.apache.http.impl.io.IdentityOutputStream;
@@ -55,13 +55,13 @@ public class TestEntitySerializer {
             // expected
         }
         try {
-            entitywriter.serialize(new SessionOutputBufferMockup() , null, null);
+            entitywriter.serialize(new SessionOutputBufferMock() , null, null);
             Assert.fail("IllegalArgumentException should have been thrown");
         } catch (IllegalArgumentException ex) {
             // expected
         }
         try {
-            entitywriter.serialize(new SessionOutputBufferMockup() , new DummyHttpMessage(), null);
+            entitywriter.serialize(new SessionOutputBufferMock() , new DummyHttpMessage(), null);
             Assert.fail("IllegalArgumentException should have been thrown");
         } catch (IllegalArgumentException ex) {
             // expected
@@ -70,40 +70,40 @@ public class TestEntitySerializer {
 
     @Test
     public void testEntityWithChunkTransferEncoding() throws Exception {
-        SessionOutputBuffer datatransmitter = new SessionOutputBufferMockup();
+        SessionOutputBuffer outbuffer = new SessionOutputBufferMock();
         HttpMessage message = new DummyHttpMessage();
         message.addHeader("Transfer-Encoding", "Chunked");
 
         EntitySerializer entitywriter = new EntitySerializer(
                 new StrictContentLengthStrategy());
-        OutputStream outstream = entitywriter.doSerialize(datatransmitter, message);
+        OutputStream outstream = entitywriter.doSerialize(outbuffer, message);
         Assert.assertNotNull(outstream);
         Assert.assertTrue(outstream instanceof ChunkedOutputStream);
     }
 
     @Test
     public void testEntityWithIdentityTransferEncoding() throws Exception {
-        SessionOutputBuffer datatransmitter = new SessionOutputBufferMockup();
+        SessionOutputBuffer outbuffer = new SessionOutputBufferMock();
         HttpMessage message = new DummyHttpMessage();
         message.addHeader("Transfer-Encoding", "Identity");
 
         EntitySerializer entitywriter = new EntitySerializer(
                 new StrictContentLengthStrategy());
-        OutputStream outstream = entitywriter.doSerialize(datatransmitter, message);
+        OutputStream outstream = entitywriter.doSerialize(outbuffer, message);
         Assert.assertNotNull(outstream);
         Assert.assertTrue(outstream instanceof IdentityOutputStream);
     }
 
     @Test
     public void testEntityWithInvalidTransferEncoding() throws Exception {
-        SessionOutputBuffer datatransmitter = new SessionOutputBufferMockup();
+        SessionOutputBuffer outbuffer = new SessionOutputBufferMock();
         HttpMessage message = new DummyHttpMessage();
         message.addHeader("Transfer-Encoding", "whatever");
 
         EntitySerializer entitywriter = new EntitySerializer(
                 new StrictContentLengthStrategy());
         try {
-            entitywriter.doSerialize(datatransmitter, message);
+            entitywriter.doSerialize(outbuffer, message);
             Assert.fail("ProtocolException should have been thrown");
         } catch (ProtocolException ex) {
             // expected
@@ -112,7 +112,7 @@ public class TestEntitySerializer {
 
     @Test
     public void testEntityWithInvalidChunkEncodingAndHTTP10() throws Exception {
-        SessionOutputBuffer datatransmitter = new SessionOutputBufferMockup();
+        SessionOutputBuffer outbuffer = new SessionOutputBufferMock();
         HttpMessage message = new DummyHttpMessage();
         message.getParams().setParameter(CoreProtocolPNames.PROTOCOL_VERSION,
                 HttpVersion.HTTP_1_0);
@@ -121,7 +121,7 @@ public class TestEntitySerializer {
         EntitySerializer entitywriter = new EntitySerializer(
                 new StrictContentLengthStrategy());
         try {
-            entitywriter.doSerialize(datatransmitter, message);
+            entitywriter.doSerialize(outbuffer, message);
             Assert.fail("ProtocolException should have been thrown");
         } catch (ProtocolException ex) {
             // expected
@@ -130,26 +130,26 @@ public class TestEntitySerializer {
 
     @Test
     public void testEntityWithContentLength() throws Exception {
-        SessionOutputBuffer datatransmitter = new SessionOutputBufferMockup();
+        SessionOutputBuffer outbuffer = new SessionOutputBufferMock();
         HttpMessage message = new DummyHttpMessage();
         message.addHeader("Content-Length", "100");
         EntitySerializer entitywriter = new EntitySerializer(
                 new StrictContentLengthStrategy());
-        OutputStream outstream = entitywriter.doSerialize(datatransmitter, message);
+        OutputStream outstream = entitywriter.doSerialize(outbuffer, message);
         Assert.assertNotNull(outstream);
         Assert.assertTrue(outstream instanceof ContentLengthOutputStream);
     }
 
     @Test
     public void testEntityWithInvalidContentLength() throws Exception {
-        SessionOutputBuffer datatransmitter = new SessionOutputBufferMockup();
+        SessionOutputBuffer outbuffer = new SessionOutputBufferMock();
         HttpMessage message = new DummyHttpMessage();
         message.addHeader("Content-Length", "whatever");
 
         EntitySerializer entitywriter = new EntitySerializer(
                 new StrictContentLengthStrategy());
         try {
-            entitywriter.doSerialize(datatransmitter, message);
+            entitywriter.doSerialize(outbuffer, message);
             Assert.fail("ProtocolException should have been thrown");
         } catch (ProtocolException ex) {
             // expected
@@ -158,11 +158,11 @@ public class TestEntitySerializer {
 
     @Test
     public void testEntityNoContentDelimiter() throws Exception {
-        SessionOutputBuffer datatransmitter = new SessionOutputBufferMockup();
+        SessionOutputBuffer outbuffer = new SessionOutputBufferMock();
         HttpMessage message = new DummyHttpMessage();
         EntitySerializer entitywriter = new EntitySerializer(
                 new StrictContentLengthStrategy());
-        OutputStream outstream = entitywriter.doSerialize(datatransmitter, message);
+        OutputStream outstream = entitywriter.doSerialize(outbuffer, message);
         Assert.assertNotNull(outstream);
         Assert.assertTrue(outstream instanceof IdentityOutputStream);
     }
@@ -172,15 +172,15 @@ public class TestEntitySerializer {
         byte[] content = new byte[] {1, 2, 3, 4, 5};
         ByteArrayEntity entity = new ByteArrayEntity(content);
 
-        SessionOutputBufferMockup datatransmitter = new SessionOutputBufferMockup();
+        SessionOutputBufferMock outbuffer = new SessionOutputBufferMock();
         HttpMessage message = new DummyHttpMessage();
         message.addHeader("Content-Length", Integer.toString(content.length));
 
         EntitySerializer entitywriter = new EntitySerializer(
                 new StrictContentLengthStrategy());
-        entitywriter.serialize(datatransmitter, message, entity);
+        entitywriter.serialize(outbuffer, message, entity);
 
-        byte[] data = datatransmitter.getData();
+        byte[] data = outbuffer.getData();
         Assert.assertNotNull(data);
         Assert.assertEquals(content.length, data.length);
     }

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestChunkCoding.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestChunkCoding.java?rev=1101465&r1=1101464&r2=1101465&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestChunkCoding.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestChunkCoding.java Tue May 10 13:56:21 2011
@@ -35,8 +35,8 @@ import java.io.OutputStream;
 
 import org.apache.http.Header;
 import org.apache.http.MalformedChunkCodingException;
-import org.apache.http.impl.SessionInputBufferMockup;
-import org.apache.http.impl.SessionOutputBufferMockup;
+import org.apache.http.impl.SessionInputBufferMock;
+import org.apache.http.impl.SessionOutputBufferMock;
 import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.util.EncodingUtils;
 import org.junit.Assert;
@@ -68,7 +68,7 @@ public class TestChunkCoding {
     @Test
     public void testChunkedInputStreamLargeBuffer() throws IOException {
         ChunkedInputStream in = new ChunkedInputStream(
-                new SessionInputBufferMockup(
+                new SessionInputBufferMock(
                         EncodingUtils.getBytes(CHUNKED_INPUT, CONTENT_CHARSET)));
         byte[] buffer = new byte[300];
         ByteArrayOutputStream out = new ByteArrayOutputStream();
@@ -97,7 +97,7 @@ public class TestChunkCoding {
     @Test
     public void testChunkedInputStreamSmallBuffer() throws IOException {
         ChunkedInputStream in = new ChunkedInputStream(
-                new SessionInputBufferMockup(
+                new SessionInputBufferMock(
                             EncodingUtils.getBytes(CHUNKED_INPUT, CONTENT_CHARSET)));
 
         byte[] buffer = new byte[7];
@@ -126,7 +126,7 @@ public class TestChunkCoding {
     public void testChunkedInputStreamOneByteRead() throws IOException {
         String s = "5\r\n01234\r\n5\r\n56789\r\n0\r\n";
         ChunkedInputStream in = new ChunkedInputStream(
-                new SessionInputBufferMockup(
+                new SessionInputBufferMock(
                         EncodingUtils.getBytes(s, CONTENT_CHARSET)));
         int ch;
         int i = '0';
@@ -144,7 +144,7 @@ public class TestChunkCoding {
     public void testAvailable() throws IOException {
         String s = "5\r\n12345\r\n0\r\n";
         ChunkedInputStream in = new ChunkedInputStream(
-                new SessionInputBufferMockup(
+                new SessionInputBufferMock(
                         EncodingUtils.getBytes(s, CONTENT_CHARSET)));
         Assert.assertEquals(0, in.available());
         in.read();
@@ -155,7 +155,7 @@ public class TestChunkCoding {
     public void testChunkedInputStreamClose() throws IOException {
         String s = "5\r\n01234\r\n5\r\n56789\r\n0\r\n";
         ChunkedInputStream in = new ChunkedInputStream(
-                new SessionInputBufferMockup(
+                new SessionInputBufferMock(
                         EncodingUtils.getBytes(s, CONTENT_CHARSET)));
         in.close();
         in.close();
@@ -183,7 +183,7 @@ public class TestChunkCoding {
     @Test
     public void testChunkedOutputStreamClose() throws IOException {
         ChunkedOutputStream out = new ChunkedOutputStream(
-                new SessionOutputBufferMockup());
+                new SessionOutputBufferMock());
         out.close();
         out.close();
         try {
@@ -205,7 +205,7 @@ public class TestChunkCoding {
     public void testChunkedInputStreamNoClosingChunk() throws IOException {
         String s = "5\r\n01234\r\n";
         ChunkedInputStream in = new ChunkedInputStream(
-                new SessionInputBufferMockup(
+                new SessionInputBufferMock(
                         EncodingUtils.getBytes(s, CONTENT_CHARSET)));
         byte[] tmp = new byte[5];
         Assert.assertEquals(5, in.read(tmp));
@@ -217,7 +217,7 @@ public class TestChunkCoding {
     public void testCorruptChunkedInputStreamMissingCRLF() throws IOException {
         String s = "5\r\n012345\r\n56789\r\n0\r\n";
         InputStream in = new ChunkedInputStream(
-                new SessionInputBufferMockup(
+                new SessionInputBufferMock(
                         EncodingUtils.getBytes(s, CONTENT_CHARSET)));
         byte[] buffer = new byte[300];
         ByteArrayOutputStream out = new ByteArrayOutputStream();
@@ -237,7 +237,7 @@ public class TestChunkCoding {
     public void testCorruptChunkedInputStreamMissingLF() throws IOException {
         String s = "5\r01234\r\n5\r\n56789\r\n0\r\n";
         InputStream in = new ChunkedInputStream(
-                new SessionInputBufferMockup(
+                new SessionInputBufferMock(
                         EncodingUtils.getBytes(s, CONTENT_CHARSET)));
         try {
             in.read();
@@ -252,7 +252,7 @@ public class TestChunkCoding {
     public void testCorruptChunkedInputStreamInvalidSize() throws IOException {
         String s = "whatever\r\n01234\r\n5\r\n56789\r\n0\r\n";
         InputStream in = new ChunkedInputStream(
-                new SessionInputBufferMockup(
+                new SessionInputBufferMock(
                         EncodingUtils.getBytes(s, CONTENT_CHARSET)));
         try {
             in.read();
@@ -267,7 +267,7 @@ public class TestChunkCoding {
     public void testCorruptChunkedInputStreamNegativeSize() throws IOException {
         String s = "-5\r\n01234\r\n5\r\n56789\r\n0\r\n";
         InputStream in = new ChunkedInputStream(
-                new SessionInputBufferMockup(
+                new SessionInputBufferMock(
                         EncodingUtils.getBytes(s, CONTENT_CHARSET)));
         try {
             in.read();
@@ -282,7 +282,7 @@ public class TestChunkCoding {
     public void testCorruptChunkedInputStreamTruncatedChunk() throws IOException {
         String s = "3\r\n12";
         InputStream in = new ChunkedInputStream(
-                new SessionInputBufferMockup(
+                new SessionInputBufferMock(
                         EncodingUtils.getBytes(s, CONTENT_CHARSET)));
         byte[] buffer = new byte[300];
         Assert.assertEquals(2, in.read(buffer));
@@ -299,7 +299,7 @@ public class TestChunkCoding {
     public void testCorruptChunkedInputStreamInvalidFooter() throws IOException {
         String s = "1\r\n0\r\n0\r\nstuff\r\n";
         InputStream in = new ChunkedInputStream(
-                new SessionInputBufferMockup(
+                new SessionInputBufferMock(
                         EncodingUtils.getBytes(s, CONTENT_CHARSET)));
         try {
             in.read();
@@ -314,7 +314,7 @@ public class TestChunkCoding {
     public void testEmptyChunkedInputStream() throws IOException {
         String input = "0\r\n";
         InputStream in = new ChunkedInputStream(
-                new SessionInputBufferMockup(
+                new SessionInputBufferMock(
                         EncodingUtils.getBytes(input, CONTENT_CHARSET)));
         byte[] buffer = new byte[300];
         ByteArrayOutputStream out = new ByteArrayOutputStream();
@@ -329,14 +329,14 @@ public class TestChunkCoding {
     public void testChunkedConsistence() throws IOException {
         String input = "76126;27823abcd;:q38a-\nkjc\rk%1ad\tkh/asdui\r\njkh+?\\suweb";
         ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-        OutputStream out = new ChunkedOutputStream(new SessionOutputBufferMockup(buffer));
+        OutputStream out = new ChunkedOutputStream(new SessionOutputBufferMock(buffer));
         out.write(EncodingUtils.getBytes(input, CONTENT_CHARSET));
         out.flush();
         out.close();
         out.close();
         buffer.close();
         InputStream in = new ChunkedInputStream(
-                new SessionInputBufferMockup(
+                new SessionInputBufferMock(
                         buffer.toByteArray()));
 
         byte[] d = new byte[10];
@@ -352,7 +352,7 @@ public class TestChunkCoding {
 
     @Test
     public void testChunkedOutputStream() throws IOException {
-        SessionOutputBufferMockup buffer = new SessionOutputBufferMockup();
+        SessionOutputBufferMock buffer = new SessionOutputBufferMock();
         ChunkedOutputStream out = new ChunkedOutputStream(buffer, 2);
         out.write('1');
         out.write('2');
@@ -387,7 +387,7 @@ public class TestChunkCoding {
 
     @Test
     public void testChunkedOutputStreamLargeChunk() throws IOException {
-        SessionOutputBufferMockup buffer = new SessionOutputBufferMockup();
+        SessionOutputBufferMock buffer = new SessionOutputBufferMock();
         ChunkedOutputStream out = new ChunkedOutputStream(buffer, 2);
         out.write(new byte[] {'1', '2', '3', '4'});
         out.finish();
@@ -416,7 +416,7 @@ public class TestChunkCoding {
     public void testChunkedOutputStreamSmallChunk() throws IOException {
         ByteArrayOutputStream buffer = new ByteArrayOutputStream();
         ChunkedOutputStream out = new ChunkedOutputStream(
-                new SessionOutputBufferMockup(buffer), 2);
+                new SessionOutputBufferMock(buffer), 2);
         out.write('1');
         out.finish();
         out.close();
@@ -440,7 +440,7 @@ public class TestChunkCoding {
     @Test
     public void testResumeOnSocketTimeoutInData() throws IOException {
         String s = "5\r\n01234\r\n5\r\n5\0006789\r\na\r\n0123\000456789\r\n0\r\n";
-        SessionInputBuffer sessbuf = new SessionInputBufferMockup(
+        SessionInputBuffer sessbuf = new SessionInputBufferMock(
                 new TimeoutByteArrayInputStream(s.getBytes("ISO-8859-1")), 16);
         InputStream in = new ChunkedInputStream(sessbuf);
 
@@ -467,7 +467,7 @@ public class TestChunkCoding {
     @Test
     public void testResumeOnSocketTimeoutInChunk() throws IOException {
         String s = "5\000\r\000\n\00001234\r\n\0005\r\n56789\r\na\r\n0123456789\r\n\0000\r\n";
-        SessionInputBuffer sessbuf = new SessionInputBufferMockup(
+        SessionInputBuffer sessbuf = new SessionInputBufferMock(
                 new TimeoutByteArrayInputStream(s.getBytes("ISO-8859-1")), 16);
         InputStream in = new ChunkedInputStream(sessbuf);
 

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestContentLengthInputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestContentLengthInputStream.java?rev=1101465&r1=1101464&r2=1101465&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestContentLengthInputStream.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestContentLengthInputStream.java Tue May 10 13:56:21 2011
@@ -31,7 +31,7 @@ import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 
-import org.apache.http.impl.SessionInputBufferMockup;
+import org.apache.http.impl.SessionInputBufferMock;
 import org.apache.http.util.EncodingUtils;
 import org.junit.Assert;
 import org.junit.Test;
@@ -42,7 +42,7 @@ public class TestContentLengthInputStrea
 
     @Test
     public void testConstructors() throws Exception {
-        new ContentLengthInputStream(new SessionInputBufferMockup(new byte[] {}), 10);
+        new ContentLengthInputStream(new SessionInputBufferMock(new byte[] {}), 10);
         try {
             new ContentLengthInputStream(null, 10);
             Assert.fail("IllegalArgumentException should have been thrown");
@@ -50,7 +50,7 @@ public class TestContentLengthInputStrea
             // expected
         }
         try {
-            new ContentLengthInputStream(new SessionInputBufferMockup(new byte[] {}), -10);
+            new ContentLengthInputStream(new SessionInputBufferMock(new byte[] {}), -10);
             Assert.fail("IllegalArgumentException should have been thrown");
         } catch (IllegalArgumentException ex) {
             // expected
@@ -60,7 +60,7 @@ public class TestContentLengthInputStrea
     @Test
     public void testBasics() throws IOException {
         String correct = "1234567890123456";
-        InputStream in = new ContentLengthInputStream(new SessionInputBufferMockup(
+        InputStream in = new ContentLengthInputStream(new SessionInputBufferMock(
             EncodingUtils.getBytes(correct, CONTENT_CHARSET)), 10L);
         ByteArrayOutputStream out = new ByteArrayOutputStream();
 
@@ -76,27 +76,27 @@ public class TestContentLengthInputStrea
 
     @Test
     public void testSkip() throws IOException {
-        InputStream in = new ContentLengthInputStream(new SessionInputBufferMockup(new byte[20]), 10L);
+        InputStream in = new ContentLengthInputStream(new SessionInputBufferMock(new byte[20]), 10L);
         Assert.assertEquals(10, in.skip(10));
         Assert.assertTrue(in.read() == -1);
 
-        in = new ContentLengthInputStream(new SessionInputBufferMockup(new byte[20]), 10L);
+        in = new ContentLengthInputStream(new SessionInputBufferMock(new byte[20]), 10L);
         in.read();
         Assert.assertEquals(9, in.skip(10));
         Assert.assertTrue(in.read() == -1);
 
-        in = new ContentLengthInputStream(new SessionInputBufferMockup(new byte[20]), 2L);
+        in = new ContentLengthInputStream(new SessionInputBufferMock(new byte[20]), 2L);
         in.read();
         in.read();
         Assert.assertTrue(in.skip(10) <= 0);
         Assert.assertTrue(in.skip(-1) == 0);
         Assert.assertTrue(in.read() == -1);
 
-        in = new ContentLengthInputStream(new SessionInputBufferMockup(new byte[2]), 4L);
+        in = new ContentLengthInputStream(new SessionInputBufferMock(new byte[2]), 4L);
         in.read();
         Assert.assertTrue(in.skip(2) == 1);
 
-        in = new ContentLengthInputStream(new SessionInputBufferMockup(new byte[20]), 10L);
+        in = new ContentLengthInputStream(new SessionInputBufferMock(new byte[20]), 10L);
         Assert.assertEquals(5,in.skip(5));
         Assert.assertEquals(5, in.read(new byte[20]));
     }
@@ -104,7 +104,7 @@ public class TestContentLengthInputStrea
     @Test
     public void testAvailable() throws IOException {
         InputStream in = new ContentLengthInputStream(
-                new SessionInputBufferMockup(new byte[] {1, 2, 3}), 10L);
+                new SessionInputBufferMock(new byte[] {1, 2, 3}), 10L);
         Assert.assertEquals(0, in.available());
         in.read();
         Assert.assertEquals(2, in.available());
@@ -113,7 +113,7 @@ public class TestContentLengthInputStrea
     @Test
     public void testClose() throws IOException {
         String correct = "1234567890123456";
-        InputStream in = new ContentLengthInputStream(new SessionInputBufferMockup(
+        InputStream in = new ContentLengthInputStream(new SessionInputBufferMock(
             EncodingUtils.getBytes(correct, CONTENT_CHARSET)), 10L);
         in.close();
         in.close();

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestContentLengthOutputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestContentLengthOutputStream.java?rev=1101465&r1=1101464&r2=1101465&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestContentLengthOutputStream.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestContentLengthOutputStream.java Tue May 10 13:56:21 2011
@@ -31,7 +31,7 @@ import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
 
-import org.apache.http.impl.SessionOutputBufferMockup;
+import org.apache.http.impl.SessionOutputBufferMock;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -39,7 +39,7 @@ public class TestContentLengthOutputStre
 
     @Test
     public void testConstructors() throws Exception {
-        new ContentLengthOutputStream(new SessionOutputBufferMockup(), 10L);
+        new ContentLengthOutputStream(new SessionOutputBufferMock(), 10L);
         try {
             new ContentLengthOutputStream(null, 10L);
             Assert.fail("IllegalArgumentException should have been thrown");
@@ -47,7 +47,7 @@ public class TestContentLengthOutputStre
             // expected
         }
         try {
-            new ContentLengthOutputStream(new SessionOutputBufferMockup(), -10);
+            new ContentLengthOutputStream(new SessionOutputBufferMock(), -10);
             Assert.fail("IllegalArgumentException should have been thrown");
         } catch (IllegalArgumentException ex) {
             // expected
@@ -57,7 +57,7 @@ public class TestContentLengthOutputStre
     @Test
     public void testBasics() throws Exception {
         ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-        SessionOutputBufferMockup datatransmitter = new SessionOutputBufferMockup(buffer);
+        SessionOutputBufferMock datatransmitter = new SessionOutputBufferMock(buffer);
         OutputStream out = new ContentLengthOutputStream(datatransmitter, 15L);
 
         byte[] tmp = new byte[10];
@@ -77,7 +77,7 @@ public class TestContentLengthOutputStre
     @Test
     public void testClose() throws Exception {
         ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-        SessionOutputBufferMockup datatransmitter = new SessionOutputBufferMockup(buffer);
+        SessionOutputBufferMock datatransmitter = new SessionOutputBufferMock(buffer);
         OutputStream out = new ContentLengthOutputStream(datatransmitter, 15L);
         out.close();
         out.close();

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestIdentityInputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestIdentityInputStream.java?rev=1101465&r1=1101464&r2=1101465&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestIdentityInputStream.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestIdentityInputStream.java Tue May 10 13:56:21 2011
@@ -27,7 +27,7 @@
 
 package org.apache.http.impl.io;
 
-import org.apache.http.impl.SessionInputBufferMockup;
+import org.apache.http.impl.SessionInputBufferMock;
 import org.apache.http.io.SessionInputBuffer;
 import org.junit.Assert;
 import org.junit.Test;
@@ -40,7 +40,7 @@ public class TestIdentityInputStream {
 
     @Test
     public void testConstructor() throws Exception {
-        SessionInputBuffer receiver = new SessionInputBufferMockup(new byte[] {});
+        SessionInputBuffer receiver = new SessionInputBufferMock(new byte[] {});
         new IdentityInputStream(receiver);
         try {
             new IdentityInputStream(null);
@@ -53,7 +53,7 @@ public class TestIdentityInputStream {
     @Test
     public void testBasicRead() throws Exception {
         byte[] input = new byte[] {'a', 'b', 'c'};
-        SessionInputBufferMockup receiver = new SessionInputBufferMockup(input);
+        SessionInputBufferMock receiver = new SessionInputBufferMock(input);
         IdentityInputStream instream = new IdentityInputStream(receiver);
         byte[] tmp = new byte[2];
         Assert.assertEquals(2, instream.read(tmp, 0, tmp.length));
@@ -69,7 +69,7 @@ public class TestIdentityInputStream {
     @Test
     public void testClosedCondition() throws Exception {
         byte[] input = new byte[] {'a', 'b', 'c'};
-        SessionInputBufferMockup receiver = new SessionInputBufferMockup(input);
+        SessionInputBufferMock receiver = new SessionInputBufferMock(input);
         IdentityInputStream instream = new IdentityInputStream(receiver);
 
         instream.close();
@@ -86,7 +86,7 @@ public class TestIdentityInputStream {
     @Test
     public void testAvailable() throws Exception {
         byte[] input = new byte[] {'a', 'b', 'c'};
-        SessionInputBufferMockup receiver = new SessionInputBufferMockup(input);
+        SessionInputBufferMock receiver = new SessionInputBufferMock(input);
         IdentityInputStream instream = new IdentityInputStream(receiver);
         instream.read();
         Assert.assertEquals(2, instream.available());

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestIdentityOutputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestIdentityOutputStream.java?rev=1101465&r1=1101464&r2=1101465&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestIdentityOutputStream.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestIdentityOutputStream.java Tue May 10 13:56:21 2011
@@ -31,7 +31,7 @@ import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
 
-import org.apache.http.impl.SessionOutputBufferMockup;
+import org.apache.http.impl.SessionOutputBufferMock;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -39,7 +39,7 @@ public class TestIdentityOutputStream {
 
     @Test
     public void testConstructors() throws Exception {
-        new IdentityOutputStream(new SessionOutputBufferMockup());
+        new IdentityOutputStream(new SessionOutputBufferMock());
         try {
             new IdentityOutputStream(null);
             Assert.fail("IllegalArgumentException should have been thrown");
@@ -51,7 +51,7 @@ public class TestIdentityOutputStream {
     @Test
     public void testBasics() throws Exception {
         ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-        SessionOutputBufferMockup datatransmitter = new SessionOutputBufferMockup(buffer);
+        SessionOutputBufferMock datatransmitter = new SessionOutputBufferMock(buffer);
         OutputStream out = new IdentityOutputStream(datatransmitter);
 
         byte[] tmp = new byte[10];
@@ -67,7 +67,7 @@ public class TestIdentityOutputStream {
     @Test
     public void testClose() throws Exception {
         ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-        SessionOutputBufferMockup datatransmitter = new SessionOutputBufferMockup(buffer);
+        SessionOutputBufferMock datatransmitter = new SessionOutputBufferMock(buffer);
         OutputStream out = new IdentityOutputStream(datatransmitter);
         out.close();
         out.close();
@@ -88,7 +88,7 @@ public class TestIdentityOutputStream {
 
     @Test
     public void testConstructor() throws Exception {
-        SessionOutputBufferMockup transmitter = new SessionOutputBufferMockup();
+        SessionOutputBufferMock transmitter = new SessionOutputBufferMock();
         new IdentityOutputStream(transmitter);
         try {
             new IdentityOutputStream(null);
@@ -100,7 +100,7 @@ public class TestIdentityOutputStream {
 
     @Test
     public void testBasicWrite() throws Exception {
-        SessionOutputBufferMockup transmitter = new SessionOutputBufferMockup();
+        SessionOutputBufferMock transmitter = new SessionOutputBufferMock();
         IdentityOutputStream outstream = new IdentityOutputStream(transmitter);
         outstream.write(new byte[] {'a', 'b'}, 0, 2);
         outstream.write('c');
@@ -118,7 +118,7 @@ public class TestIdentityOutputStream {
 
     @Test
     public void testClosedCondition() throws Exception {
-        SessionOutputBufferMockup transmitter = new SessionOutputBufferMockup();
+        SessionOutputBufferMock transmitter = new SessionOutputBufferMock();
         IdentityOutputStream outstream = new IdentityOutputStream(transmitter);
         outstream.close();
         outstream.close();

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestMessageParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestMessageParser.java?rev=1101465&r1=1101464&r2=1101465&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestMessageParser.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestMessageParser.java Tue May 10 13:56:21 2011
@@ -33,7 +33,7 @@ import org.apache.http.Header;
 import org.apache.http.HeaderElement;
 import org.apache.http.NameValuePair;
 import org.apache.http.ProtocolException;
-import org.apache.http.impl.SessionInputBufferMockup;
+import org.apache.http.impl.SessionInputBufferMock;
 import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.message.BufferedHeader;
 import org.junit.Assert;
@@ -71,7 +71,7 @@ public class TestMessageParser {
             "\t and even more stuff\r\n" +
             "     \r\n" +
             "\r\n";
-        SessionInputBuffer receiver = new SessionInputBufferMockup(s, "US-ASCII");
+        SessionInputBuffer receiver = new SessionInputBufferMock(s, "US-ASCII");
         Header[] headers = AbstractMessageParser.parseHeaders
             (receiver, -1, -1, null);
         Assert.assertNotNull(headers);
@@ -96,7 +96,7 @@ public class TestMessageParser {
         String s =
             "header1  : stuff; param1 = value1; param2 = \"value 2\" \r\n" +
             "\r\n";
-        SessionInputBuffer receiver = new SessionInputBufferMockup(s, "US-ASCII");
+        SessionInputBuffer receiver = new SessionInputBufferMock(s, "US-ASCII");
         Header[] headers = AbstractMessageParser.parseHeaders
             (receiver, -1, -1, null);
         Assert.assertNotNull(headers);
@@ -121,7 +121,7 @@ public class TestMessageParser {
         String s = "    stuff\r\n" +
             "header1: stuff\r\n" +
             "\r\n";
-        SessionInputBuffer receiver = new SessionInputBufferMockup(s, "US-ASCII");
+        SessionInputBuffer receiver = new SessionInputBufferMock(s, "US-ASCII");
         try {
             AbstractMessageParser.parseHeaders(receiver, -1, -1, null);
             Assert.fail("ProtocolException should have been thrown");
@@ -131,7 +131,7 @@ public class TestMessageParser {
         s = "  :  stuff\r\n" +
             "header1: stuff\r\n" +
             "\r\n";
-        receiver = new SessionInputBufferMockup(s, "US-ASCII");
+        receiver = new SessionInputBufferMock(s, "US-ASCII");
         try {
             AbstractMessageParser.parseHeaders(receiver, -1, -1, null);
             Assert.fail("ProtocolException should have been thrown");
@@ -145,7 +145,7 @@ public class TestMessageParser {
         String s =
             "    header1: stuff\r\n" +
             "header2  : stuff \r\n";
-        SessionInputBuffer receiver = new SessionInputBufferMockup(s, "US-ASCII");
+        SessionInputBuffer receiver = new SessionInputBufferMock(s, "US-ASCII");
         Header[] headers = AbstractMessageParser.parseHeaders
             (receiver, -1, -1, null);
         Assert.assertNotNull(headers);
@@ -159,7 +159,7 @@ public class TestMessageParser {
     @Test
     public void testEmptyDataStream() throws Exception {
         String s = "";
-        SessionInputBuffer receiver = new SessionInputBufferMockup(s, "US-ASCII");
+        SessionInputBuffer receiver = new SessionInputBufferMock(s, "US-ASCII");
         Header[] headers = AbstractMessageParser.parseHeaders
             (receiver, -1, -1, null);
         Assert.assertNotNull(headers);
@@ -173,7 +173,7 @@ public class TestMessageParser {
             "header2: stuff \r\n" +
             "header3: stuff\r\n" +
             "\r\n";
-        SessionInputBuffer receiver = new SessionInputBufferMockup(s, "US-ASCII");
+        SessionInputBuffer receiver = new SessionInputBufferMock(s, "US-ASCII");
         try {
             AbstractMessageParser.parseHeaders(receiver, 2, -1, null);
             Assert.fail("IOException should have been thrown");
@@ -189,7 +189,7 @@ public class TestMessageParser {
             " stuff \r\n" +
             " stuff\r\n" +
             "\r\n";
-        SessionInputBuffer receiver = new SessionInputBufferMockup(s, "US-ASCII");
+        SessionInputBuffer receiver = new SessionInputBufferMock(s, "US-ASCII");
         try {
             AbstractMessageParser.parseHeaders(receiver, 2, 15, null);
             Assert.fail("IOException should have been thrown");

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestRequestParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestRequestParser.java?rev=1101465&r1=1101464&r2=1101465&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestRequestParser.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestRequestParser.java Tue May 10 13:56:21 2011
@@ -39,7 +39,7 @@ import org.apache.http.HttpRequest;
 import org.apache.http.HttpVersion;
 import org.apache.http.RequestLine;
 import org.apache.http.impl.DefaultHttpRequestFactory;
-import org.apache.http.impl.SessionInputBufferMockup;
+import org.apache.http.impl.SessionInputBufferMock;
 import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.message.BasicLineParser;
 import org.apache.http.params.BasicHttpParams;
@@ -64,7 +64,7 @@ public class TestRequestParser {
             // expected
         }
         try {
-            SessionInputBuffer inbuffer = new SessionInputBufferMockup(new byte[] {});
+            SessionInputBuffer inbuffer = new SessionInputBufferMock(new byte[] {});
             new HttpRequestParser(
                     inbuffer,
                     BasicLineParser.DEFAULT,
@@ -75,7 +75,7 @@ public class TestRequestParser {
             // expected
         }
         try {
-            SessionInputBuffer inbuffer = new SessionInputBufferMockup(new byte[] {});
+            SessionInputBuffer inbuffer = new SessionInputBufferMock(new byte[] {});
             new HttpRequestParser(
                     inbuffer,
                     BasicLineParser.DEFAULT,
@@ -95,7 +95,7 @@ public class TestRequestParser {
             "User-Agent: whatever\r\n" +
             "Cookie: c1=stuff\r\n" +
             "\r\n";
-        SessionInputBuffer inbuffer = new SessionInputBufferMockup(s, "US-ASCII");
+        SessionInputBuffer inbuffer = new SessionInputBufferMock(s, "US-ASCII");
 
         HttpRequestParser parser = new HttpRequestParser(
                 inbuffer,
@@ -116,7 +116,7 @@ public class TestRequestParser {
 
     @Test
     public void testConnectionClosedException() throws Exception {
-        SessionInputBuffer inbuffer = new SessionInputBufferMockup(new byte[] {});
+        SessionInputBuffer inbuffer = new SessionInputBufferMock(new byte[] {});
 
         HttpRequestParser parser = new HttpRequestParser(
                 inbuffer,
@@ -139,7 +139,7 @@ public class TestRequestParser {
             "User-Agent: whatever\r\n" +
             "Coo\000kie: c1=stuff\r\n" +
             "\000\r\n";
-        SessionInputBuffer inbuffer = new SessionInputBufferMockup(
+        SessionInputBuffer inbuffer = new SessionInputBufferMock(
                 new TimeoutByteArrayInputStream(s.getBytes("US-ASCII")), 16);
 
         HttpRequestParser parser = new HttpRequestParser(

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestResponseParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestResponseParser.java?rev=1101465&r1=1101464&r2=1101465&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestResponseParser.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestResponseParser.java Tue May 10 13:56:21 2011
@@ -35,7 +35,7 @@ import org.apache.http.HttpVersion;
 import org.apache.http.NoHttpResponseException;
 import org.apache.http.StatusLine;
 import org.apache.http.impl.DefaultHttpResponseFactory;
-import org.apache.http.impl.SessionInputBufferMockup;
+import org.apache.http.impl.SessionInputBufferMock;
 import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.message.BasicLineParser;
 import org.apache.http.params.BasicHttpParams;
@@ -60,7 +60,7 @@ public class TestResponseParser {
             // expected
         }
         try {
-            SessionInputBuffer inbuffer = new SessionInputBufferMockup(new byte[] {});
+            SessionInputBuffer inbuffer = new SessionInputBufferMock(new byte[] {});
             new HttpResponseParser(
                     inbuffer,
                     BasicLineParser.DEFAULT,
@@ -71,7 +71,7 @@ public class TestResponseParser {
             // expected
         }
         try {
-            SessionInputBuffer inbuffer = new SessionInputBufferMockup(new byte[] {});
+            SessionInputBuffer inbuffer = new SessionInputBufferMock(new byte[] {});
             new HttpResponseParser(
                     inbuffer,
                     BasicLineParser.DEFAULT,
@@ -91,7 +91,7 @@ public class TestResponseParser {
             "Date: some date\r\n" +
             "Set-Cookie: c1=stuff\r\n" +
             "\r\n";
-        SessionInputBuffer inbuffer = new SessionInputBufferMockup(s, "US-ASCII");
+        SessionInputBuffer inbuffer = new SessionInputBufferMock(s, "US-ASCII");
 
         HttpResponseParser parser = new HttpResponseParser(
                 inbuffer,
@@ -112,7 +112,7 @@ public class TestResponseParser {
 
     @Test
     public void testConnectionClosedException() throws Exception {
-        SessionInputBuffer inbuffer = new SessionInputBufferMockup(new byte[] {});
+        SessionInputBuffer inbuffer = new SessionInputBufferMock(new byte[] {});
 
         HttpResponseParser parser = new HttpResponseParser(
                 inbuffer,
@@ -135,7 +135,7 @@ public class TestResponseParser {
             "Date: some date\r\n" +
             "Set-Coo\000kie: c1=stuff\r\n" +
             "\000\r\n";
-        SessionInputBuffer inbuffer = new SessionInputBufferMockup(
+        SessionInputBuffer inbuffer = new SessionInputBufferMock(
                 new TimeoutByteArrayInputStream(s.getBytes("US-ASCII")), 16);
 
         HttpResponseParser parser = new HttpResponseParser(



Mime
View raw message