org.apache.commons.fileupload
Class ServletFileUploadTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.fileupload.FileUploadTestCase
              extended by org.apache.commons.fileupload.ServletFileUploadTest
All Implemented Interfaces:
junit.framework.Test

public class ServletFileUploadTest
extends FileUploadTestCase

Unit tests DiskFileUpload.

Author:
John McNally, Sean C. Sullivan

Field Summary
 
Fields inherited from class org.apache.commons.fileupload.FileUploadTestCase
CONTENT_TYPE
 
Constructor Summary
ServletFileUploadTest()
           
 
Method Summary
 void testEmptyFile()
          This is what the browser does if you submit the form without choosing a file.
 void testFilenameCaseSensitivity()
           
 void testFileUpload()
           
 void testFILEUPLOAD62()
          Test for FILEUPLOAD-62
 void testFoldedHeaders()
          Test for FILEUPLOAD-111
 void testIE5MacBug()
          Internet Explorer 5 for the Mac has a bug where the carriage return is missing on any boundary line immediately preceding an input with type=image.
 void testWithInvalidRequest()
           
 void testWithNullContentType()
           
 
Methods inherited from class org.apache.commons.fileupload.FileUploadTestCase
parseUpload, parseUpload, parseUpload
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServletFileUploadTest

public ServletFileUploadTest()
Method Detail

testWithInvalidRequest

public void testWithInvalidRequest()

testWithNullContentType

public void testWithNullContentType()

testFileUpload

public void testFileUpload()
                    throws IOException,
                           FileUploadException
Throws:
IOException
FileUploadException

testFilenameCaseSensitivity

public void testFilenameCaseSensitivity()
                                 throws IOException,
                                        FileUploadException
Throws:
IOException
FileUploadException

testEmptyFile

public void testEmptyFile()
                   throws UnsupportedEncodingException,
                          FileUploadException
This is what the browser does if you submit the form without choosing a file.

Throws:
UnsupportedEncodingException
FileUploadException

testIE5MacBug

public void testIE5MacBug()
                   throws UnsupportedEncodingException,
                          FileUploadException
Internet Explorer 5 for the Mac has a bug where the carriage return is missing on any boundary line immediately preceding an input with type=image. (type=submit does not have the bug.)

Throws:
UnsupportedEncodingException
FileUploadException

testFILEUPLOAD62

public void testFILEUPLOAD62()
                      throws Exception
Test for FILEUPLOAD-62

Throws:
Exception

testFoldedHeaders

public void testFoldedHeaders()
                       throws IOException,
                              FileUploadException
Test for FILEUPLOAD-111

Throws:
IOException
FileUploadException


Copyright © 2002-2010 The Apache Software Foundation. All Rights Reserved.