Hi Wesly,
This makes much more sense, thank you for this explanation.
I've rechecked the issue and actually I did find a minor bug in there that might explain the difficulties.
However, I still feel that there is something wrong with the logic of the test.
Here is how i would write the test:
Process p = new Process();
Mock<Process> myMock = MockManager.Mock<Process>();
myMock.CallStatic.ExpectAndReturn("Start", p);
As you can see Ive moved the creation of the returned process before the declaration of the mock. otherwise the isolator will actual returned from the call to Start would be a "mocked" instance.
In case this is exactly what you wanted i would go for this:
MockObject<Process> myMock = MockManager.MockObject<Process>();
myMock.CallStatic.ExpectAndReturn("Start", myMock.Object);
At any case you can either of the examples. Both should work for you.
:?: what is the purpose of this line (in the real code)?
System.Diagnostics.Process p = new System.Diagnostics.Process();
i think it is not needed there. you can replace that part (both lines) with:
Process p = Process.Start(reportSave.FileName);