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

2017-06-16 Thread kinow
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



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

2017-06-16 Thread kinow
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 
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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