jericho     2002/10/10 18:32:16

  Modified:    src/tests/client TestXMLResponseMethodBase.java
  Log:
  - Revert to the revision 1.3
  - Prevent the gump (For that, just make it a document reference)
  
  Revision  Changes    Path
  1.5       +20 -41    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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestXMLResponseMethodBase.java    17 Aug 2002 05:29:50 -0000      1.4
  +++ TestXMLResponseMethodBase.java    11 Oct 2002 01:32:16 -0000      1.5
  @@ -72,11 +72,14 @@
   import org.apache.webdav.lib.methods.*;
   import org.apache.util.WebdavStatus;
   
  -public class TestXMLResponseMethodBase {
  -
  -     public static void testGetStatusCode(String responseBody) throws Exception {
  -
  -             Test1XMLResponseMethodBase test1 = new Test1XMLResponseMethodBase();
  +public class TestXMLResponseMethodBase 
  +{
  +    /* prevent the gump
  +     public TestXMLResponseMethodBase() { }
  +
  +     public void testGetStatusCode(String responseBody) throws Exception
  +     {
  +             XMLResponseMethodBase test1 = new XMLResponseMethodBase();
                InputStream data = new ByteArrayInputStream(responseBody.getBytes());
                test1.setStatusCode(WebdavStatus.SC_MULTI_STATUS);
                test1.parseResponse(data);
  @@ -93,17 +96,18 @@
                        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 {
  -                     testGetStatusCode(
  +     try 
  +     {
  +            TestXMLResponseMethodBase test = new TestXMLResponseMethodBase();
  +            test.testGetStatusCode(
                                "<multistatus xmlns=\"DAV:\"><response>" + 
                                        "<href>/slide/files/</href>" + 
                                        "<propstat>" +
  @@ -116,43 +120,18 @@
                                        "</propstat>" +
                                "</response></multistatus>");
                                
  -                     testGetStatusCode(
  +                     test.testGetStatusCode(
                                "<multistatus xmlns=\"DAV:\"><response>" + 
                                        "<href>/slide/files/</href>" + 
                                        "<href>/slide/files/a</href>" + 
                                        "<status>HTTP/1.1 200 OK</status>" +
                                "</response></multistatus>");
                        
  -     } catch (Exception ex) {
  +     }
  +     catch (Exception ex) 
  +     {
                ex.printStackTrace();
        }
       }
  -
  -    // ---------------------------------------------------------- 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]>

Reply via email to