Archives for December 2006
Donation towards Creating Safe Drinking Water
We have decided to participate with Jamie Cansdale and have donated 5 TypeMock Enterprise Licenses to go towards creating safe drinking water in Malawi Africa. You can see a link to the auction here.
Ever since I travelled in Africa a decade ago, it has been a special place for me and I am delighted to help […]
How to Stub with Conditional Expectations
Conditional Expectations is quite a powerful tool, that allows expectations to act differently according to the arguments passed to the mocked method.
This is very useful for Stubbing methods. Suppose there is a static method Customer.GetAge(string customerName) that needs to be isolated. But the tested code calls GetAge several times with different customerNames. How can Mocked Customer.GetAge be mocked, to […]
When to Stub and When to Mock
I was actually going to talk about how to stub using TypeMock but then I found that a little explanation is required.
If you haven’t read Mocks Aren’t Stubs by Martin Fowler, you should read it now. In short The difference between Mocks and Stubs is in the verification.
Stubs are fake objects that are required […]