hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1775805 - in /httpcomponents/httpcore/trunk/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework: ClassicTestClientAdapter.java ClientPOJOAdapter.java ClientTestingAdapter.java TestingFramework.java
Date Fri, 23 Dec 2016 09:23:45 GMT
Author: olegk
Date: Fri Dec 23 09:23:45 2016
New Revision: 1775805

URL: http://svn.apache.org/viewvc?rev=1775805&view=rev
Log:
Minor documentation and formatting changes.

Modified:
    httpcomponents/httpcore/trunk/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/ClassicTestClientAdapter.java
    httpcomponents/httpcore/trunk/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/ClientPOJOAdapter.java
    httpcomponents/httpcore/trunk/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/ClientTestingAdapter.java
    httpcomponents/httpcore/trunk/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/TestingFramework.java

Modified: httpcomponents/httpcore/trunk/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/ClassicTestClientAdapter.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/ClassicTestClientAdapter.java?rev=1775805&r1=1775804&r2=1775805&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/ClassicTestClientAdapter.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/ClassicTestClientAdapter.java
Fri Dec 23 09:23:45 2016
@@ -43,7 +43,9 @@ import org.apache.hc.core5.http.io.entit
 import org.apache.hc.core5.http.io.entity.StringEntity;
 import org.apache.hc.core5.http.message.BasicClassicHttpRequest;
 import org.apache.hc.core5.http.protocol.HttpCoreContext;
-import org.apache.hc.core5.testing.classic.ClassicTestClient; public class ClassicTestClientAdapter
extends ClientPOJOAdapter {
+import org.apache.hc.core5.testing.classic.ClassicTestClient;
+
+public class ClassicTestClientAdapter extends ClientPOJOAdapter {
 
     /**
      * {@inheritDoc}

Modified: httpcomponents/httpcore/trunk/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/ClientPOJOAdapter.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/ClientPOJOAdapter.java?rev=1775805&r1=1775804&r2=1775805&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/ClientPOJOAdapter.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/ClientPOJOAdapter.java
Fri Dec 23 09:23:45 2016
@@ -109,7 +109,7 @@ public abstract class ClientPOJOAdapter
      * a particular request, a non-null reason should be returned.  Otherwise, if
      * the request is supported, return null.</p>
      *
-     * <p>If this method is overridden, then the start method should probably call
+     * <p>If this method is overridden, then the execute method should probably call
      * assertRequestSupported() at the beginning.</p>
      *
      * @param request the request as specified above.
@@ -123,7 +123,7 @@ public abstract class ClientPOJOAdapter
     /**
      * <p>Assert that the request is supported</p>
      *
-     * <p>Usually called by the start method.  Throws an exception if the request
+     * <p>Usually called by the execute method.  Throws an exception if the request
      * is not supported.</p>
      *
      * @param request the request as specified above.
@@ -144,7 +144,7 @@ public abstract class ClientPOJOAdapter
      * special request handler of the in-process HttpServer which will later check
      * an actual HTTP request against what is expected.</p>
      *
-     * <p>In a production context, this is called by the start method (if at all).</p>
+     * <p>In a production context, this is called by the execute method (if at all).</p>
      *
      * @param request the request as specified above.
      * @return the same request or a modification of it.

Modified: httpcomponents/httpcore/trunk/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/ClientTestingAdapter.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/ClientTestingAdapter.java?rev=1775805&r1=1775804&r2=1775805&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/ClientTestingAdapter.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/ClientTestingAdapter.java
Fri Dec 23 09:23:45 2016
@@ -27,7 +27,9 @@
 
 package org.apache.hc.core5.testing.framework;
 
-import java.util.Map; public class ClientTestingAdapter {
+import java.util.Map;
+
+public class ClientTestingAdapter {
     /**
      * This adapter will perform the HTTP request and return the response in the
      * expected format.
@@ -36,8 +38,8 @@ import java.util.Map; public class Clien
 
     /*
      * The following is not expected to be changed to true, but it is to highlight
-     * where the start method can call the requestHandler's assertNothingThrown()
-     * method if desired.  Since this adapter's start method does not check
+     * where the execute method can call the requestHandler's assertNothingThrown()
+     * method if desired.  Since this adapter's execute method does not check
      * the response, there is no need to call it.
      */
     protected boolean callAssertNothingThrown;
@@ -57,17 +59,17 @@ import java.util.Map; public class Clien
      * it can optionally call assertNothingThrown() before checking the response
      * further.  It is optional because the test framework will call it later.
      *
-     * @param defaultURI           See start method of {@link ClientPOJOAdapter}.
-     * @param request              See start method of {@link ClientPOJOAdapter}.
+     * @param defaultURI           See execute method of {@link ClientPOJOAdapter}.
+     * @param request              See execute method of {@link ClientPOJOAdapter}.
      * @param requestHandler       The request handler that checks the received HTTP request
      *                             with the request that was intended.  If there is a
      *                             mismatch of expectations, then the requestHandler will
-     *                             throw an exception.  If this start method does not want
+     *                             throw an exception.  If this execute method does not want
      *                             to make further checks of the response in the case
      *                             the responseHandler threw, then the assertNothingThrown()
      *                             method should be called before doing further checks.
      * @param responseExpectations The response expectations of the test.
-     * @return See return of the start method of {@link ClientPOJOAdapter}.
+     * @return See return of the execute method of {@link ClientPOJOAdapter}.
      * @throws TestingFrameworkException in the case of a problem.
      */
     public Map<String, Object> execute(final String defaultURI, final Map<String,
Object> request,
@@ -78,7 +80,7 @@ import java.util.Map; public class Clien
             if (adapter == null) {
                 throw new TestingFrameworkException("adapter cannot be null");
             }
-            // Call the adapter's start method to actually make the HTTP request.
+            // Call the adapter's execute method to actually make the HTTP request.
             final Map<String, Object> response = adapter.execute(defaultURI, request);
 
             /*

Modified: httpcomponents/httpcore/trunk/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/TestingFramework.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/TestingFramework.java?rev=1775805&r1=1775804&r2=1775805&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/TestingFramework.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/TestingFramework.java
Fri Dec 23 09:23:45 2016
@@ -52,7 +52,9 @@ import org.apache.hc.core5.http.HttpVers
 import org.apache.hc.core5.http.ProtocolVersion;
 import org.apache.hc.core5.http.config.SocketConfig;
 import org.apache.hc.core5.http.impl.io.bootstrap.HttpServer;
-import org.apache.hc.core5.http.impl.io.bootstrap.ServerBootstrap; public class TestingFramework
{
+import org.apache.hc.core5.http.impl.io.bootstrap.ServerBootstrap;
+
+public class TestingFramework {
     /**
      * Use the ALL_METHODS list to conveniently cycle through all HTTP methods.
      */



Mime
View raw message