title: Rhino Mocks - Fluent Mocking - Expect.Call question
body: <p>I'm trying to use the fluent mocking style of Rhino.Mocks and have the following code that works on a mock IDictionary object called 'factories':</p>
  
  <pre><code>With.Mocks(_Repository).Expecting(() =&gt;
          {
              Expect.Call(() =&gt; factories.ContainsKey(Arg&lt;String&gt;.Is.Anything));
              LastCall.Return(false);
  
              Expect.Call(() =&gt; factories.Add(Arg&lt;String&gt;.Is.Anything, Arg&lt;Object&gt;.Is.Anything));
          }).Verify(() =&gt;
          {
              _Service = new ObjectRequestService(factories);
              _Service.RegisterObjectFactory(Valid_Factory_Key, factory);
          });
  </code></pre>
  
  <p>Now, the only way I have been able to set the return value of the ContainsKey call is to use LastCall.Return(true) on the following line.</p>
  
  <p>I'm sure I'm mixing styles here as Expect.Call() has a .Return(Expect.Action) method but I can't figure out how I am suppose to use it correctly to return a boolean value?</p>
  
  <p>Can anyone help out?  Hope the question is clear enough - let me know if anyone needs more info!</p>
  
  <p>Cheers,
  Ben</p>