Java Mailing List Archive

http://www.gg3721.com/

Home » user.jmock »

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

René Günther

2010-01-19

Replies: Find Java Web Hosting

Author LoginPost Reply

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

 

 

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