<p>I would like to do something like the following but can't seem to get the syntax for the Do method quite right.</p>

<pre><code>var sqr = new _mocks.CreateRenderer&lt;ShapeRenderer&gt;();
Expect.Call(sqr.CanRender(null)).IgnoreArguments().Do(x =&gt;x.GetType() == typeof(Square)).Repeat.Any();
</code></pre>

<p>So basically, I would like to set up the sqr.CanRender() method to return true if the input is of type Square and false otherwise.</p>

Are you looking for this?
```
```
Expect.Call(sqr.CanRender(null)).IgnoreArguments()
    .Do((Func<Shape, bool>) delegate(Agent x){return x.GetType() == typeof(Square);})
    .Repeat.Any();
```
```
EDIT: The answer was correct in spirit bu the original syntax did not quite work.