jericho 2002/08/16 22:29:50
Modified: src/tests/client TestXMLResponseMethodBase.java
Log:
- Just prevent the build failure. (I'm not sure it's useful though...)
Revision Changes Path
1.4 +43 -19 jakarta-slide/src/tests/client/TestXMLResponseMethodBase.java
Index: TestXMLResponseMethodBase.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/tests/client/TestXMLResponseMethodBase.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TestXMLResponseMethodBase.java 25 Apr 2002 21:15:14 -0000 1.3
+++ TestXMLResponseMethodBase.java 17 Aug 2002 05:29:50 -0000 1.4
@@ -72,13 +72,11 @@
import org.apache.webdav.lib.methods.*;
import org.apache.util.WebdavStatus;
-public class TestXMLResponseMethodBase
-{
- public TestXMLResponseMethodBase() { }
-
- public static void testGetStatusCode(String responseBody) throws Exception
- {
- XMLResponseMethodBase test1 = new XMLResponseMethodBase();
+public class TestXMLResponseMethodBase {
+
+ public static void testGetStatusCode(String responseBody) throws Exception {
+
+ Test1XMLResponseMethodBase test1 = new Test1XMLResponseMethodBase();
InputStream data = new ByteArrayInputStream(responseBody.getBytes());
test1.setStatusCode(WebdavStatus.SC_MULTI_STATUS);
test1.parseResponse(data);
@@ -95,16 +93,16 @@
Enumeration responseProperties = response.getProperties();
while (responseProperties.hasMoreElements()) {
Property property = (Property)
responseProperties.nextElement();
- System.out.println(" " + property.getLocalName() + " "
+ property.getPropertyAsString() + " " + property.getStatusCode());
+ System.out.println(" " + property.getLocalName() + " "
+
+ property.getPropertyAsString() + " " +
+ property.getStatusCode());
}
}
}
- public static void main(String[] args)
- {
+ public static void main(String[] args) {
- try
- {
+ try {
testGetStatusCode(
"<multistatus xmlns=\"DAV:\"><response>" +
"<href>/slide/files/</href>" +
@@ -125,10 +123,36 @@
"<status>HTTP/1.1 200 OK</status>" +
"</response></multistatus>");
- }
- catch (Exception ex)
- {
+ } catch (Exception ex) {
ex.printStackTrace();
}
}
-}
\ No newline at end of file
+
+ // ---------------------------------------------------------- Inner classes
+
+ public static class Test1XMLResponseMethodBase
+ extends XMLResponseMethodBase {
+
+ protected int statusCode = -1;
+ protected String href = null;
+
+ public int getStatusCode() {
+ return statusCode;
+ }
+
+ public void setStatusCode(int statusCode) {
+ this.statusCode = statusCode;
+ }
+
+ public String getHref() {
+ return href;
+ }
+
+ public void setHref(String href) {
+ this.href = href;
+ }
+
+ }
+
+}
+
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>