Jon Aquino's Mental Garden

Engineering beautiful software jon aquino labs | personal blog

Thursday, May 26, 2005

"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:

Post a Comment

<< Home