In the above case (from the graph testing suite):
TransactionHandler th = Mockito.mock( TransactionHandler.class ); Graph g = Factory.createGraphMemWithTransactionHandler(th); Assert.assertEquals( th, g.getTransactionHandler() ); On Fri, Aug 30, 2013 at 4:50 PM, Andy Seaborne <[email protected]> wrote: > Claude, > > I don't understand what is being mocked. Could you explain a bit about the > intention/design you have for the testing. I guess I'm lacking context. > > Andy > > > > On 30/08/13 16:37, Stephen Allen wrote: > >> I'm a big fan of Mockito, so I'd like to see it added. >> >> -Stephen >> >> On Thu, Aug 29, 2013 at 1:38 PM, Claude Warren <[email protected]> wrote: >> >>> I am rewriting the test cases for JUnit 4.x (4.11 currently) and am >>> thinking about adding Mockito to mock some of the objects in the tests. >>> For example testing that >>> >>> Graph g = Factory.**createGraphMemWithTransactionH**andler(th); >>> g.getTransactionHandler(); >>> returns the same transaction handler. >>> >>> Does anyone have a problem with adding Mockito the the test build? >>> >>> -- >>> I like: Like Like - The likeliest place on the web< >>> http://like-like.xenei.com**> >>> Identity: >>> https://www.identify.nu/user.**[email protected]<https://www.identify.nu/[email protected]> >>> LinkedIn: >>> http://www.linkedin.com/in/**claudewarren<http://www.linkedin.com/in/claudewarren> >>> >> > -- I like: Like Like - The likeliest place on the web<http://like-like.xenei.com> Identity: https://www.identify.nu/[email protected] LinkedIn: http://www.linkedin.com/in/claudewarren
