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

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

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

ajs6f
GitHub user kinow opened a pull request:

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

    FILEUPLOAD-238: 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-238

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

    https://github.com/apache/commons-fileupload/pull/7.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 #7
   
----
commit 5adc6aefc39aaa39987e909259ef7f1e6bc38e72
Author: Bruno P. Kinoshita <[hidden email]>
Date:   2017-06-11T05:23:07Z

    FILEUPLOAD-238: 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
|

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

ajs6f
Github user kinow closed the pull request at:

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


---
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
|

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

ajs6f
In reply to this post by ajs6f
Github user jochenw commented on the issue:

    https://github.com/apache/commons-fileupload/pull/7
 
    Bruno, you are a Commons PMC member. Why use a Github pull request, and not just do a commit?



---
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
|

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

ajs6f
In reply to this post by ajs6f
Github user kinow commented on the issue:

    https://github.com/apache/commons-fileupload/pull/7
 
    I use pull requests when I want someone else to review my code. In this case, I modified the tests design a wee bit too (not just added portlet tests), so would like that someone confirmed the change looks OK.


---
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]