Hi James,
I'm not sure that I understand if you are trying to set expectation on the first 5 calls or just trying to verify that the method was called 5 times.
Both are possible with Typemock:
Typemock allows you to create sequenced behavior.
You can do:
Isolate.WhenCalled( () => _cache["test"] ).WillReturn (new object());
Isolate.WhenCalled( () => _cache["test"] ).WillReturn (new object());
Isolate.WhenCalled( () => _cache["test"] ).WillReturn (new object());
Isolate.WhenCalled( () => _cache["test"] ).WillReturn (new object());
Isolate.WhenCalled( () => _cache["test"] ).WillReturn (new object());
Isolate.WhenCalled( () => _cache["test"] ).CallOriginal();
The code above will make _cache["test"] return new object() for the first five calls and the original implementation will be called from the sixth call and on.
In order to assert that the method was called 5 times you should use:
var timesCalled = Isolate.Verify.GetTimesCalled(() => _cache["test"]);
Assert.AreEqual(5 , timesCalled);