commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (FILEUPLOAD-283) Add tests to the portlet package
Date Fri, 16 Jun 2017 23:07:00 GMT


ASF GitHub Bot commented on FILEUPLOAD-283:

GitHub user kinow opened a pull request:

    FILEUPLOAD-283: add tests for the portlet package

    Initial tests for the portlet package. I believe there have been updates to the portlet
specification(s) that have not been applied to Commons FileUpload yet. Hopefully, having unit
tests will help us later when changing the package.
    Removed strings like "US-ASCII" using the `StandardCharsets` class from Java 7.
    There was a class -`FileUploadTestCase`- that was extended by other tests. But it became
problematic as there were tests that would be common to any implementation of `FileUpload`,
while other tests were specific to `ServletFileUpload`.
    This pull request removed the inheritance from the tests, by a `Util` class (open to other
suggestions) with methods for parsing uploads and for tests.
    Tests related to `ServletFileUpload` are now in `ServletFileUploadTest`, in the `.servlet`
package in the test sources.
    Tests related to `PortletFileUpload` are now in `PortletFileUploadTest`, in the `.portlet`
package in the test sources.
    There are no functional changes in the tests. Coverage remained the same for other classes.
For the `.portlet` package, it went from 0% to 60% in my local working copy.
    There are lots of other parts that need better coverage, but at least I think having tests
in separated classes will make it slightly easier to add more.

You can merge this pull request into a Git repository by running:

    $ git pull FILEUPLOAD-283

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #8
commit f8f529ee0baecc9262317cc5375af1eb42aadab4
Author: Bruno P. Kinoshita <>
Date:   2017-06-11T05:23:07Z

    FILEUPLOAD-283: add tests for the portlet package


> Add tests to the portlet package
> --------------------------------
>                 Key: FILEUPLOAD-283
>                 URL:
>             Project: Commons FileUpload
>          Issue Type: Improvement
>            Reporter: Bruno P. Kinoshita
>            Assignee: Bruno P. Kinoshita
>            Priority: Minor
>              Labels: coverage, test
> Currently, the o.a.c.fileupload.portlet is reported as having 0% coverage in the cobertura
> During the last vote thread I noted that and added a post-it to add some tests. Creating
a ticket so that I do not forget.

This message was sent by Atlassian JIRA

View raw message