Hi Richard,
First, tillig's examples are great- you can use them.
I'd like to point the subtlety of using MockObject and Mock. In you example, you used Mock, which connects to the
next instance that will be created. That means, that if the instance returned by:
B data = m_Collection.GetCurrent();
was created BEFORE you called Mock - the expectations and return values are not really set on the instance that's returned from GetCurrent, but the next one that will be created.
MockObject creates a real instance that can be returned using the examples.
You can also get more details on the differences beteween Mock and MockObject
here.