rmcdouga commented on a change in pull request #6: Added support for simulating 
HTML forms (including file uploads)…
URL: 
https://github.com/apache/sling-org-apache-sling-servlet-helpers/pull/6#discussion_r288212802
 
 

 ##########
 File path: 
src/test/java/org/apache/sling/servlethelpers/MockSlingHttpServletRequestTest.java
 ##########
 @@ -316,6 +317,47 @@ public void testRequestParameter() throws Exception {
         assertEquals("param1", 
((MockRequestParameter)request.getRequestParameter("param1")).getName());
     }
 
+    @Test
+    public void testFormRequestParameters() throws Exception {
 
 Review comment:
   I had one such case (param4).  I could add additional cases for the other 
addRequestParameter() methods.  I didn't at the time time because I thought the 
test would be redundant.  If I had created them, then I would have spotted the 
issue that was highlighted by the consolidated helper function.  Now that the 
redundant code is consolidated however, I'm not sure if the extra tests are 
required (since they all just call that same helper function).
   
   Let me know what you think.  I'm inclined not to want to do this as the 
extra tests are mostly just calling the same code (only one line difference 
between them).  That one line difference is tested by the single value tests.  
Having said that, if you feel differently, I don't mind adding them in.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to