You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2021/09/22 05:04:52 UTC

[GitHub] [commons-jxpath] wx930910 opened a new pull request #22: JXPATH-198: Refactor Context to improve test logic

wx930910 opened a new pull request #22:
URL: https://github.com/apache/commons-jxpath/pull/22


   ### JIRA
   
   Fixes [XPATH-198](https://issues.apache.org/jira/browse/JXPATH-198)
   
   ### Description
   
   #### Refactor test class [Context](https://github.com/apache/commons-jxpath/blob/192f4c92727cf5387a8043525a1e1e1533c9ac69/src/test/java/org/apache/commons/jxpath/ri/compiler/ExtensionFunctionTest.java#L388)
   
   <hr>
   
   #### Motivation
   
    * Decouple test class `Context` from production interface `ExpressionContext`.
    * Remove the redundant test child class `Context`
    * Remove the redundant overridden methods that return default values.
    * Make testing logic more explict.
   
   <hr>
   
   ##### Key changed/added classes in this PR
    * Created mocking object to replace test subclass `Context`, decoupled test from production code.
    * Created a method that return the mocking object for reuse purpose.
    * Use method stub to replace method overriding to control mocking object's behavior.
    * Remove redundant overridden methods to improve test logic.
    * Add Mockito dependency.
   
   <hr>


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

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [commons-jxpath] garydgregory commented on pull request #22: JXPATH-198: Refactor Context to improve test logic

Posted by GitBox <gi...@apache.org>.
garydgregory commented on pull request #22:
URL: https://github.com/apache/commons-jxpath/pull/22#issuecomment-924598109


   Exact same comment as https://github.com/apache/commons-codec/pull/94#issuecomment-924597345
   


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

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org