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


   Fix [COLLECTIONS-798](https://issues.apache.org/jira/browse/COLLECTIONS-798)
   
   ### Description
   
   #### Replace test class 
[TestBuilder](https://github.com/apache/commons-collections/blob/3aae82cbaaaf539bf3f54cd6a0679efc123f2c8e/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/HasherBuilderTest.java#L41)
 by mocking object and improve test design.
   <hr>
   
   ##### Motivation
   
    - Decouple test class {{TestBuilder}} from production interface {{Builder}}.
    - Make test logic more clear by using method stub instead of method 
overriding.
    - Make test condition more explict by use local variable in test case.
   
   <hr>
   
   ##### Key changed/added classes in this PR
    - Created mocking object to replace test subclass `TestBuilder`, decoupled 
test from production code.
    - Extract `items` as a local variable to improve test logic and make test 
condition more explict.
    - Make test logic more clear by using method stub instead of method 
overriding.
    - 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to