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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

asfgit
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 <[hidden email]>
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 [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

asfgit
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 [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

asfgit
In reply to this post by asfgit
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 [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...