rwaldhoff 01/08/16 19:24:16
Modified: httpclient/src/java/org/apache/commons/httpclient Tag:
rlwrefactoring HeaderElement.java
httpclient/src/test/org/apache/commons/httpclient Tag:
rlwrefactoring TestNoHost.java
Added: httpclient/src/test/org/apache/commons/httpclient Tag:
rlwrefactoring TestHeaderElement.java
Log:
Moving main-method test from HeaderElement into an actual JUnit test
Revision Changes Path
No revision
No revision
1.3.2.2 +3 -23
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HeaderElement.java
Index: HeaderElement.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HeaderElement.java,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -u -r1.3.2.1 -r1.3.2.2
--- HeaderElement.java 2001/08/14 18:01:29 1.3.2.1
+++ HeaderElement.java 2001/08/17 02:24:15 1.3.2.2
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HeaderElement.java,v
1.3.2.1 2001/08/14 18:01:29 rwaldhoff Exp $
- * $Revision: 1.3.2.1 $
- * $Date: 2001/08/14 18:01:29 $
+ * $Header:
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HeaderElement.java,v
1.3.2.2 2001/08/17 02:24:15 rwaldhoff Exp $
+ * $Revision: 1.3.2.2 $
+ * $Date: 2001/08/17 02:24:15 $
*
* ====================================================================
*
@@ -356,25 +356,5 @@
return pair;
}
- public static void main(String[] args) {
- // let's test this class
- try {
- String headerValue = "name1 = value1; name2; name3=\"value3\" ,
name4=value4; " +
- "name5=value5, name6= ; name7 = value7; name8 = \" name8\"";
- HeaderElement[] elements = HeaderElement.parse(headerValue);
- for (int i = 0; i < elements.length; i++) {
- System.out.println("name =>" + elements[i].getName());
- System.out.println("value=>" + elements[i].getValue());
- if (elements[i].parameters != null) {
- for (int j = 0; j < elements[i].parameters.length; j++) {
- System.out.println("parameter name =>" +
elements[i].parameters[j].getName());
- System.out.println("parameter value=>" +
elements[i].parameters[j].getValue());
- }
- }
- }
- } catch (Exception exception) {
- System.out.println(exception);
- }
- }
}
No revision
No revision
1.1.2.2 +5 -4
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/Attic/TestNoHost.java
Index: TestNoHost.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/Attic/TestNoHost.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- TestNoHost.java 2001/08/13 16:02:57 1.1.2.1
+++ TestNoHost.java 2001/08/17 02:24:16 1.1.2.2
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/Attic/TestNoHost.java,v
1.1.2.1 2001/08/13 16:02:57 rwaldhoff Exp $
- * $Revision: 1.1.2.1 $
- * $Date: 2001/08/13 16:02:57 $
+ * $Header:
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/Attic/TestNoHost.java,v
1.1.2.2 2001/08/17 02:24:16 rwaldhoff Exp $
+ * $Revision: 1.1.2.2 $
+ * $Date: 2001/08/17 02:24:16 $
* ====================================================================
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
@@ -21,7 +21,7 @@
* (True unit tests, by some definitions.)
*
* @author Rodney Waldhoff
- * @version $Id: TestNoHost.java,v 1.1.2.1 2001/08/13 16:02:57 rwaldhoff Exp $
+ * @version $Id: TestNoHost.java,v 1.1.2.2 2001/08/17 02:24:16 rwaldhoff Exp $
*/
public class TestNoHost extends TestCase {
@@ -35,6 +35,7 @@
suite.addTest(TestCookie.suite());
suite.addTest(TestNVP.suite());
suite.addTest(TestHeader.suite());
+ suite.addTest(TestHeaderElement.suite());
suite.addTest(TestMD5Encoder.suite());
suite.addTest(TestAuthenticator.suite());
return suite;
No revision
No revision
1.1.2.1 +90 -0
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/Attic/TestHeaderElement.java