You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by GitBox <gi...@apache.org> on 2021/08/02 04:07:40 UTC

[GitHub] [jackrabbit] wx930910 opened a new pull request #95: Replace DummyInternalVersion with mocking object to make test conditiā€¦

wx930910 opened a new pull request #95:
URL: https://github.com/apache/jackrabbit/pull/95


   Fixes [#JCR-4710 Refactor DummyInternalVersion in VersionIteratorImplTest.java to improve test logic](https://issues.apache.org/jira/browse/JCR-4710).
   
   ### Description
   
   #### Refactor test class [VersionIteratorImplTest.java](https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/version/VersionIteratorImplTest.java)
   
   <hr>
   
   #### Motivation
   
   - Decoupling test class `DummyInternalVersion` from production interface `InternalVersion`.
   - Making test condition more clear by removing all redundant overridden methods.
   - Making test logic more clear by using method stub instead of method overriding.
   
   <hr>
   
   ##### Key changed/added classes in this PR
    * Created mocking object to replace test subclass `DummyInternalVersion`, 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.
   
   <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: dev-unsubscribe@jackrabbit.apache.org

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