I was trying to use Mock.ExpectAndReturn and found the timesToRun argument to be misleading. Not that I'm complaining much :wink: . TypeMock is still great stuff.
I expected that if I specified timesToRun = 1, then TypeMock would verify that my Mocked function runs EXACTLY 1 time. Instead, timesToRun only verifies that my Mocked function is run AT LEAST 1 time.
Is there any way that I can test my ClassUnderTest in such a way that I can verify that my mocked function is not run AT ALL? That is, if my mocked function runs 1 or more times, the test would fail? I need to test that under certain conditions, my mocked function is not called.
My feeling is that this may not be possible to test. Still, if somebody has any ideas...???
Thanks very much.