bdelacretaz commented on pull request #11:
URL: 
https://github.com/apache/sling-org-apache-sling-engine/pull/11#issuecomment-780412434


   Sorry to bring in yet another opinion but I think the tests can be written 
in a more concise way, with better failure messages, instead of:
   
       boolean isValid = RequestData.isValidRequest("/path/content../test");
       assertFalse(isValid);
   
   something like:
   
       private static void assertValidRequest(boolean expected, String path) {
         assertEquals(
           "Expected " + expected + " for " + path,
           expected,
           RequestData.isValidRequest(path)
         );
       }
   
   
   And then use
   
       assertValidRequest(false, "/path/content../test");
       assertValidRequest(true, "/path/which.is.valid");
   
   for the repeated tests.
   


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


Reply via email to