A: 

RhinoMocks has the AssertWasCalled method which may serve the purpose of guaranteeing that a method calls another method... but I'm not sure you can do that on a private function of the same class you are unit testing. I think you could only do that if the two methods you wanted to stub were in another dependency class that was injected.

Nick
+2  A: 

try Isolate.NonPublic.WhenCalled(object,"nonpublic method").IgnoreCall

or Isolate.Verify.NonPublic.WasCalled(object,"method"..

RoyOsherove
That's what I was looking for... but it doesn't appear to work..I did this: Isolate.NonPublic.WhenCalled(target, "ValidatePropertiesExist").IgnoreCall();However... when the function is called, it goes into the actual code... Any ideas why? The function takes 3 params (which I'm not specifying anywhere), I wonder if It has to do with that... ?
dferraro
I've also tried using an Accessor for the class instead of actual class (using MSTEST here), and did a normal 'WhenCalled'. I did: Isolate.WhenCalled(() => target.CheckUniqueness(entity, propertyNames, retrieveHelper, service)).WillReturn(true); where 'target' is my Foo_Accessor. It gives me this exception: "*** WhenCalled does not support using a method call as an argument.- To fix this pass false instead of CrmEntityUniqueValidator_Accessor.CheckUniqueness()"Which makes no sense, since I am not passing any method calls as params...
dferraro
are you sure you are running this with typemock enabled inside visual studio? if you run it from an external tool outside of VS you should be using tmockrunner.exe
RoyOsherove
in any case I'd highly suggest you post this on the TM forums or email support AT typemock.com - to be able to share more code and see
RoyOsherove