On 5/12/06, John Fallows <[EMAIL PROTECTED]> wrote:

On 5/10/06, Adam Winer <[EMAIL PROTECTED]> wrote:
>
> JMock does look interesting, but a couple of basic questions:
> - Is it available in a maven repository?


Yes.  http://www.ibiblio.org/maven2/jmock/

- Is its license compatible?


On the surface, it would appear so, but IANAL and never played one on TV.
The way to get a definitive answer is to submit this to the
[email protected] mailing list where license-savvy folks are hanging
out.  I'll forward them a query.

CGLib is under Apache2 license and jMock is under the following license

http://jmock.codehaus.org/license.html

... and one more general one.  The thing that drives me up the
> wall with the current mock codebase in the ADF Faces tests
> is that it forces you to say "I expect method foo() to be called
> at least N times", even though with JSF there's rarely any
> such assurances whether a method will be called or not,
> and if so how many times.   E.g., how often is FacesContext.getViewRoot
()
> called?  Once?  Twice?  20 times?


As the test writer you have the flexibility to either specify the number
of
calls precisely or not, depending on whether or not it is important to the
test.


I think Adam's point was that the number of calls might be indeterminate if
different implementations of JSF do things differently.  On the other hand,
I wouldn't want to use a library that *forced* me to specify call counts,
even when I didn't care, either :-).

Craig

Reply via email to