Looks like we got it
working now with …with(equal(new String[]{Constants.ADMIN}))
Cheers
Rene
Von:
"Günther, Rene - Innflow AG" [mailto:rene.guenther@innflow.com]
Gesendet: Dienstag, 19. Januar 2010 15:01
An: user@jmock.codehaus.org
Betreff: [jmock-user] Testing method which is accepting String... as
parameter
Hi,
we are having the following method on our
interface: findByRoles(String… roles)
We are calling it like that:
findByRole(“admin”);
We tried to set the expectation
one(…).findByRoles(with(equal(Constants.ADMIN));
Which caused unexpectedInvocationException.
Is there a special handling for that kind
of parameters (variable length arguments)?
Thanks
Rene