Java Mailing List Archive

http://www.gg3721.com/

Home » user.jmock »

[jmock-user] Testing method which is accepting String... as parameter

René Günther

2010-01-19

Replies: Find Java Web Hosting

Author LoginPost Reply

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

 

 

©2008 gg3721.com - Jax Systems, LLC, U.S.A.