From: Bas V. <bjv...@qu...> - 2007-03-03 21:48:35
|
Hi, Do you mean you want the mock objects to use the same pre and post conditions as the real objects? In that case you could specify the conditions for an interface and make both the real object as the mock implement it. Bas ----- Original Message ----- From: "Gilles Scokart" <gsc...@gm...> To: <jco...@li...> Sent: Saturday, March 03, 2007 5:11 PM Subject: [Jcontracts-users] Design by contract and mock objects > 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 > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Jcontracts-users mailing list > Jco...@li... > https://lists.sourceforge.net/lists/listinfo/jcontracts-users |