sullis      2003/03/08 10:29:17

  Modified:    fileupload/src/test/org/apache/commons/fileupload
                        HttpServletRequestFactory.java
  Log:
  updated test code
  CVS: ----------------------------------------------------------------------
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  Changes    Path
  1.3       +13 -2     
jakarta-commons/fileupload/src/test/org/apache/commons/fileupload/HttpServletRequestFactory.java
  
  Index: HttpServletRequestFactory.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/fileupload/src/test/org/apache/commons/fileupload/HttpServletRequestFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HttpServletRequestFactory.java    8 Mar 2003 05:04:41 -0000       1.2
  +++ HttpServletRequestFactory.java    8 Mar 2003 18:29:17 -0000       1.3
  @@ -75,9 +75,20 @@
        }
   
        static public HttpServletRequest createValidHttpServletRequest(
  -             final String[] strFileNames)
  +                     final String[] strFileNames)
        {
  -             byte[] requestData = "todo".getBytes();
  +             // todo - provide a real implementation 
  +             
  +             StringBuffer sbRequestData = new StringBuffer();
  +             
  +             for (int i = 0; i < strFileNames.length; i++)
  +             {
  +                     sbRequestData.append(strFileNames[i]);
  +             }
  +             
  +             byte[] requestData = null;
  +             requestData = sbRequestData.toString().getBytes();
  +             
                return new MyHttpServletRequest(
                                                        requestData,
                                                        
FileUpload.MULTIPART_FORM_DATA);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to