wx930910 opened a new pull request #462:
URL: https://github.com/apache/cayenne/pull/462


   Fix [CAY-2717](https://issues.apache.org/jira/browse/CAY-2717)
   
   ### Description
   
   #### Refactor test class 
[DataContextDataChannelEventsIT.java](https://github.com/apache/cayenne/blob/b156addac1c8e4079fa88e977fee609210c5da69/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextDataChannelEventsIT.java#L43)
 by using Mockito.
   
   <hr>
   
   ##### Motivation
   
   - Decoupling test class `MockChannelListener` from production interface 
`DataChannelListener`
   - Making test condition more clear by removing redundant overridden methods 
and new fields. 
   - Use `Mockito.verify()` to directly verify the behavior of the mocking 
object and make test condition more explict.
   
   <hr>
   
   ##### Key changed/added classes in this PR
   
   - Creating mocking object to replace test subclass `MockChannelListener`, 
decoupled test from production code.
   - Replacing assertation statement by using `Mockito.verify()` to verify the 
invocation status of `graphChanged(GraphEvent)`, `graphFlushed(GraphEvent)` and 
`graphRolledback(GraphEvent)`.
   


-- 
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: commits-unsubscr...@cayenne.apache.org

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


Reply via email to