Class TestCommonsMultipartRequestHandler

java.lang.Object
org.apache.struts.mock.TestMockBase
org.apache.struts.upload.TestCommonsMultipartRequestHandler

public class TestCommonsMultipartRequestHandler extends TestMockBase
Unit tests for the CommonsMultipartRequestHandler class.
Author:
ste-gr
  • Constructor Details

    • TestCommonsMultipartRequestHandler

      public TestCommonsMultipartRequestHandler()
  • Method Details

    • testAcceptFileWithMaxFileSize

      @Test public void testAcceptFileWithMaxFileSize() throws Exception
      Test with maximum file size exceeded.
      Throws:
      Exception
    • testAcceptFileWithMaxRequestSize

      @Test public void testAcceptFileWithMaxRequestSize() throws Exception
      Test with maximum request size exceeded.
      Throws:
      Exception
    • testSuccessUploadOfATextFileMultipartRequest

      @Test public void testSuccessUploadOfATextFileMultipartRequest() throws Exception
      Test for an successful upload.
      Throws:
      Exception
    • testEmptyContentTypeMultipartRequest

      @Test public void testEmptyContentTypeMultipartRequest()
      Test with no content.
    • testMultipleAccept

      @Test public void testMultipleAccept() throws Exception
      Tests with multiple files sent with the same name.
      Throws:
      Exception
    • testUnacceptedNumberOfFiles

      @Test public void testUnacceptedNumberOfFiles() throws Exception
      Tests with multiple files sent with the same name.
      Throws:
      Exception
    • testMultipartRequestMaxStringLength

      @Test public void testMultipartRequestMaxStringLength() throws Exception
      Test with maximum string length exceeded.
      Throws:
      Exception