commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sul...@apache.org
Subject cvs commit: jakarta-commons/fileupload/src/test/org/apache/commons/fileupload MultipartStreamTest.java
Date Fri, 07 Mar 2003 23:13:14 GMT
sullis      2003/03/07 15:13:14

  Modified:    fileupload/src/test/org/apache/commons/fileupload
                        MultipartStreamTest.java
  Log:
  added unit 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.4       +27 -4     jakarta-commons/fileupload/src/test/org/apache/commons/fileupload/MultipartStreamTest.java
  
  Index: MultipartStreamTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/fileupload/src/test/org/apache/commons/fileupload/MultipartStreamTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MultipartStreamTest.java	27 Oct 2002 18:45:59 -0000	1.3
  +++ MultipartStreamTest.java	7 Mar 2003 23:13:14 -0000	1.4
  @@ -3,7 +3,7 @@
   /* ====================================================================
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 2002-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -57,6 +57,7 @@
   import junit.framework.Test;
   import junit.framework.TestCase;
   import org.apache.commons.fileupload.*;
  +import java.io.*;
   
   /**
    * Unit tests {@link org.apache.commons.fileupload.MultipartStream}.
  @@ -66,10 +67,32 @@
    */
   public class MultipartStreamTest extends TestCase
   {
  +	static private final String BOUNDARY_TEXT = "myboundary"; 
   
  -    public void testMultipartStream()
  -    {
  -    	// todo 
  +    public void testDefaultConstructor() throws Exception {
  +    	MultipartStream ms = new MultipartStream();
  +    }
  +    
  +    public void testThreeParamConstructor() throws Exception {
  +    	InputStream input = null;
  +    	byte[] boundary = BOUNDARY_TEXT.getBytes();
  +    	int iBufSize = boundary.length;
  +    	MultipartStream ms = new MultipartStream(
  +    			input,
  +    			boundary,
  +    			iBufSize);
       }
   
  +	public void testTwoParamConstructor() throws Exception {
  +		InputStream input = null;
  +		byte[] boundary = BOUNDARY_TEXT.getBytes();
  +		MultipartStream ms = new MultipartStream(
  +				input,
  +				boundary);
  +	}
  +	
  +	public void testToString() {
  +		MultipartStream ms = new MultipartStream();
  +		assertNotNull(ms.toString());
  +	}
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message