i have s.th. like that in a method:
using (IProgramRunner runner = new ProgramRunner (new
PersistenceManager ()))
{
RunPrimaryInstance (args, runner);
}
}
in my test file i want to test s.th. in RunPrimaryInstance, so i made
a PartialMock
IProgramRunner programRunnerMock =
repository.PartialMock<ProgramRunner> (persistenceManagerStub);
programRunnerMock.Expect (mock => mock.StartDownload
(Arg<FileData>.Is.Anything));
Program programMock = repository.PartialMock<Program> ();
programMock.Expect (mock => mock.RunPrimaryInstance (_args,
programRunnerMock));
but if i call this test, the second argument of RunPrimaryInstance ist
not my mock object but a new instance of RunPrimaryInstance, how can i
force my implementation to use the runner-mock? i checked all
arguments but the partial mocks should have the right signature ...
does anyone knows the answer to make my implementation use the
programRunnerMock? thx for replies
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---