I have ClassX that has MethodX. MethodX takes in DtoX. MethodX in
return instantiates another class, ClassY which calls MethodY which in
return calls db. I obviously do not want to call the db and hence the
isolation frameworkn but what is the best way to test this out?

I currently have the following but failing to see what I'm really
testing here and what what the point is:

ClassX stub = MockRepository.GenerateStub<ClassX>();
stub.Stub(x => x.MethodX(Arg<DtoX>.Is.Anything)).Return(expected);
DtoX request = new DtoX(null);
DtoY response = stub.MethodX(request);
// asserts

stub.AssertWasCalled(x => x.MethodX(request));

-- 
You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rhinomocks?hl=en.

Reply via email to