You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by kinow <gi...@git.apache.org> on 2017/06/16 23:06:55 UTC

[GitHub] commons-fileupload pull request #8: FILEUPLOAD-283: add tests for the portle...

GitHub user kinow opened a pull request:

    https://github.com/apache/commons-fileupload/pull/8

    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.
    
    Cheers
    Bruno

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

    $ git pull https://github.com/kinow/commons-fileupload FILEUPLOAD-283

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

    https://github.com/apache/commons-fileupload/pull/8.patch

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 <br...@yahoo.com.br>
Date:   2017-06-11T05:23:07Z

    FILEUPLOAD-283: add tests for the portlet package

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] commons-fileupload issue #8: FILEUPLOAD-283: add tests for the portlet packa...

Posted by kinow <gi...@git.apache.org>.
Github user kinow commented on the issue:

    https://github.com/apache/commons-fileupload/pull/8
  
    No objections so far, will merge it tomorrow after reviewing the code once more :+1: 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] commons-fileupload pull request #8: FILEUPLOAD-283: add tests for the portle...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/commons-fileupload/pull/8


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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