hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rola...@apache.org
Subject svn commit: r618122 - in /httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn: TestAllConn.java TestParams.java params/ params/TestAllConnParams.java params/TestParams.java params/TestRouteParams.java
Date Sun, 03 Feb 2008 23:26:30 GMT
Author: rolandw
Date: Sun Feb  3 15:26:29 2008
New Revision: 618122

URL: http://svn.apache.org/viewvc?rev=618122&view=rev
Log:
first tests for route params

Added:
    httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/params/
    httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/params/TestAllConnParams.java
  (with props)
    httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/params/TestParams.java
      - copied, changed from r618109, httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/TestParams.java
    httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/params/TestRouteParams.java
  (with props)
Removed:
    httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/TestParams.java
Modified:
    httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/TestAllConn.java

Modified: httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/TestAllConn.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/TestAllConn.java?rev=618122&r1=618121&r2=618122&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/TestAllConn.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/TestAllConn.java
Sun Feb  3 15:26:29 2008
@@ -30,6 +30,7 @@
 
 package org.apache.http.conn;
 
+import org.apache.http.conn.params.TestAllConnParams;
 import org.apache.http.conn.routing.TestAllRouting;
 import org.apache.http.conn.ssl.TestAllSSL;
 import org.apache.http.conn.util.TestAllUtil;
@@ -48,8 +49,8 @@
         TestSuite suite = new TestSuite();
 
         suite.addTest(TestScheme.suite());
-        suite.addTest(TestParams.suite());
         suite.addTest(TestExceptions.suite());
+        suite.addTest(TestAllConnParams.suite());
         suite.addTest(TestAllRouting.suite());
         suite.addTest(TestAllSSL.suite());
         suite.addTest(TestAllUtil.suite());

Added: httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/params/TestAllConnParams.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/params/TestAllConnParams.java?rev=618122&view=auto
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/params/TestAllConnParams.java
(added)
+++ httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/params/TestAllConnParams.java
Sun Feb  3 15:26:29 2008
@@ -0,0 +1,61 @@
+/*
+ * $HeadURL$
+ * $Revision$
+ * $Date$
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
+
+package org.apache.http.conn.params;
+
+import org.apache.http.conn.routing.TestAllRouting;
+import org.apache.http.conn.ssl.TestAllSSL;
+import org.apache.http.conn.util.TestAllUtil;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class TestAllConnParams extends TestCase {
+
+    public TestAllConnParams(String testName) {
+        super(testName);
+    }
+
+    public static Test suite() {
+        TestSuite suite = new TestSuite();
+
+        suite.addTest(TestParams.suite());
+        suite.addTest(TestRouteParams.suite());
+
+        return suite;
+    }
+
+    public static void main(String args[]) {
+        String[] testCaseName = { TestAllConnParams.class.getName() };
+        junit.textui.TestRunner.main(testCaseName);
+    }
+
+}

Propchange: httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/params/TestAllConnParams.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/params/TestAllConnParams.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/params/TestAllConnParams.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/params/TestParams.java
(from r618109, httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/TestParams.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/params/TestParams.java?p2=httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/params/TestParams.java&p1=httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/TestParams.java&r1=618109&r2=618122&rev=618122&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/TestParams.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/params/TestParams.java
Sun Feb  3 15:26:29 2008
@@ -29,7 +29,7 @@
  *
  */
 
-package org.apache.http.conn;
+package org.apache.http.conn.params;
 
 import junit.framework.Test;
 import junit.framework.TestCase;

Added: httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/params/TestRouteParams.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/params/TestRouteParams.java?rev=618122&view=auto
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/params/TestRouteParams.java
(added)
+++ httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/params/TestRouteParams.java
Sun Feb  3 15:26:29 2008
@@ -0,0 +1,111 @@
+/*
+ * $HeadURL$
+ * $Revision$
+ * $Date$
+ * 
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
+
+package org.apache.http.conn.params;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.apache.http.HttpHost;
+import org.apache.http.params.HttpParams;
+import org.apache.http.params.BasicHttpParams;
+import org.apache.http.conn.params.HttpConnectionManagerParams;
+import org.apache.http.conn.routing.HttpRoute;
+
+
+/**
+ * Unit tests for parameters.
+ * Trivial, but it looks better in the Clover reports.
+ */
+public class TestRouteParams extends TestCase {
+
+    public final static
+        HttpHost TARGET1 = new HttpHost("target1.test.invalid");
+    public final static
+        HttpRoute ROUTE1 = new HttpRoute(TARGET1);
+
+
+    public TestRouteParams(String testName) {
+        super(testName);
+    }
+
+    public static void main(String args[]) {
+        String[] testCaseName = { TestRouteParams.class.getName() };
+        junit.textui.TestRunner.main(testCaseName);
+    }
+
+    public static Test suite() {
+        return new TestSuite(TestRouteParams.class);
+    }
+
+
+    public void testBadArgs() {
+
+        try {
+            HttpRouteParams.getDefaultProxy(null);
+        } catch (IllegalArgumentException iax) {
+            // expected
+        }
+
+        try {
+            HttpRouteParams.getForcedRoute(null);
+        } catch (IllegalArgumentException iax) {
+            // expected
+        }
+
+        try {
+            HttpRouteParams.getLocalAddress(null);
+        } catch (IllegalArgumentException iax) {
+            // expected
+        }
+
+        try {
+            HttpRouteParams.setDefaultProxy(null, null);
+        } catch (IllegalArgumentException iax) {
+            // expected
+        }
+
+        try {
+            HttpRouteParams.setForcedRoute(null, null);
+        } catch (IllegalArgumentException iax) {
+            // expected
+        }
+
+        try {
+            HttpRouteParams.setLocalAddress(null, null);
+        } catch (IllegalArgumentException iax) {
+            // expected
+        }
+    }
+
+
+}

Propchange: httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/params/TestRouteParams.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/params/TestRouteParams.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/conn/params/TestRouteParams.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message