From: Johan S. <j.s...@ja...> - 2007-03-04 11:12:34
|
> Do you think jcontracts invariant/pre/post conditions can be placed in > a rule engine ? If not, do you know other tools that does? Unfortunately you cannot do what you want with JContractS. JContractS integrates the contracts with the classes during builds. As mock objects are generated at runtime, they will not contain the contracts. You should use a design by contract tool that generates the contract checking code at runtime. I think the best you can do is look at an implementation that uses annotations to define the contracts. Here is a list of implemenations: http://en.wikipedia.org/wiki/Design_by_contract#Java Johan Stuyts |