From: Gilles S. <gsc...@gm...> - 2007-03-03 16:11:46
|
Hello, I'm searching for a design by contract tool that could interoperate with mock objects. (see http://www.jmock.org/ or http://www.mockobjects.com/ for good reference of what are mock object if you don't know what it is). My requirement is that the assertion defined in the design by contract tool can be placed in a rules engine and reused by the mock objects. The mock object will register all method invocation, verify that the preconditions are verified, verify that the return value defined in the test, and register the postcondition assertion in order to be able to verify the precondition of the next expecations. The goal here is really to simulate the object (by using the return values set in the unit test), and not to use the real object, on order to test the user of the mocked object. Do you think jcontracts invariant/pre/post conditions can be placed in a rule engine ? If not, do you know other tools that does? Thanks, -- Gilles SCOKART |