"Mock Objects" - Great Unit-Testing Technique
Today I learned how to use "mock objects", which are a super-easy way to create fake objects for testing. You barely have to write any code - just tell the DynamicMockObject what values to return for what method names.
Update: I must say that NMock is better than DotNetMock. Better documentation, more tutorials, more flexible specification of values (IsAnything), rules can be relaxed (SetupResult).
2 Comments:
Mock objects rock!
I recently started using EasyMock in my JUnits, now I don't think I can do without!
By Living Below, at 7/22/2005 10:34 a.m.
Hi Erik - Thanks for the EasyMock recommendation.
By Jonathan, at 7/22/2005 12:33 p.m.
Post a Comment
<< Home