added getMetrics to conn mockup, moved TestHttpRoute to non-impl package

git-svn-id: https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk@548037 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Roland Weber 2007-06-17 12:40:50 +00:00
parent be3c4732ab
commit d34ee9f954
5 changed files with 66 additions and 4 deletions

View File

@ -34,6 +34,7 @@ import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.apache.http.conn.TestAllConn;
import org.apache.http.conn.ssl.TestAllSSL;
import org.apache.http.cookie.TestAllCookie;
import org.apache.http.impl.client.TestAllHttpClientImpl;
@ -51,6 +52,7 @@ public class TestAll extends TestCase {
suite.addTest(TestAllCookie.suite());
suite.addTest(TestAllCookieImpl.suite());
suite.addTest(TestAllHttpClientImpl.suite());
suite.addTest(TestAllConn.suite());
suite.addTest(TestAllConnImpl.suite());
suite.addTest(TestAllSSL.suite());
suite.addTest(TestHttpState.suite());

View File

@ -0,0 +1,57 @@
/*
* $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;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
public class TestAllConn extends TestCase {
public TestAllConn(String testName) {
super(testName);
}
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTest(TestHttpRoute.suite());
//suite.addTest(TestScheme.suite()); @@@ this one has a problem
return suite;
}
public static void main(String args[]) {
String[] testCaseName = { TestAllConn.class.getName() };
junit.textui.TestRunner.main(testCaseName);
}
}

View File

@ -28,7 +28,7 @@
*
*/
package org.apache.http.impl.conn;
package org.apache.http.conn;
import java.net.InetAddress;
@ -40,7 +40,6 @@ import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.apache.http.HttpHost;
import org.apache.http.conn.HttpRoute;
/**

View File

@ -43,8 +43,7 @@ public class TestAllConnImpl extends TestCase {
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTest(TestHttpRoute.suite());
suite.addTest(TestLocalServer.suite());
suite.addTest(TestLocalServer.suite()); // doesn't really belong here
suite.addTest(TestTSCCMNoServer.suite());
suite.addTest(TestTSCCMWithServer.suite());

View File

@ -33,6 +33,7 @@ package org.apache.http.mockup;
import java.io.IOException;
import org.apache.http.HttpConnection;
import org.apache.http.HttpConnectionMetrics;
/**
* {@link HttpConnection} mockup implementation.
@ -69,4 +70,8 @@ public class HttpConnectionMockup implements HttpConnection {
public void setSocketTimeout(int timeout) {
}
public HttpConnectionMetrics getMetrics() {
return null;
}
}