I am trying to use Rhino's dynamic joke style and the following code that works on a fake IDictionary object Is called 'factories':
with .mox (_Repository). Estimated (= =) => {Expect.Call ((=) => Factories .comer (Arg Anything)); LastCall.Return (wrong); Expect.Call ( (=) Factories. Add (Arg & lt; string & gt; Anything, Arg & lt; Object & gt; Anything))}). ) = & Gt; {_Service = New Object Recess Service (factories); _Service.RegisterObjectFactory (Valid_Factory_Key, Factory);});
Now, the only way I can be able to set the return value of the ContainsKey call is to use LastCall.Return (true) on the following line.
I am sure that I am mixing styles as expected here. There is a return (hopefully action) method of call (), but I do not understand how can I return a bullion value to use it correctly?
Can anyone help? Hopefully the question is quite clear - I know that anyone needs more information!
Cheers, Ben
I believe the following line wants you That you want:
Expect.Call (factories suppress that (Arg any.)). Return (wrong);
Comments
Post a Comment