From: Bryce F. <br...@be...> - 2004-01-07 19:35:50
|
Thanks to everyone who responded. Your responses helped me greatly > Steve Freeman said: > You need to tell the mock about the two input parameters, otherwise it > can't tell which method you're referring to. There are some helper > methods in the C class. That's where I was confused. I thought that specifying nothing in the parameters meant you didn't care what was passed. Now it makes more sense. Thanks. > Nat said: > If you want to ignore the exact values, you can do: > > expectAndReturn( "validateLogin", C.ANY_ARGS, Boolean.TRUE ); Which just confirmed it, and gave me what I thought I was originally doing. > Nat also said: > I would also suggest that you use "self describing values" for your username > and password parameters: > > addRequestParameter("username", "THE-USERNAME"); > addRequestParameter("password", "THE-PASSWORD"); Thanks for the tip. I will definitely consider doing that. Thanks again for all your help. -- Bryce Fischer <br...@be...> |