Mock Objects in Unit Testing

在MSN上遇到了老哥(chen56)得知最近辞职在家开发了一个小工具,并放到了sf.net上

HiMock http://himock.sourceforge.net/

以前对TDD了解一些,实践过几次,感觉也很好;不过Mock Objects的概念今天还是第一次听到-_-!

搜索MO,发现在XP2000上就已经提出了这个概念:

Endo Testing: Unit Testing with Mock Objects

Unit testing is the testing of software units in isolation. However,most units do not work alone,but they collaborate with other units. To test a unit in isolation,we have to simulate the collaborators in the test.Mock Objects are test-oriented replacements for collaborators.

目前MO的项目还有 EasyMockJMock

挺感兴趣,最近打算研究一下;并答应老哥做这个开源项目的文档国际化的工作

一个很好的学习锻炼的机会

相关文章

迭代器模式(Iterator)迭代器模式(Iterator)[Cursor]意图...
高性能IO模型浅析服务器端编程经常需要构造高性能的IO模型,...
策略模式(Strategy)策略模式(Strategy)[Policy]意图:定...
访问者模式(Visitor)访问者模式(Visitor)意图:表示一个...
命令模式(Command)命令模式(Command)[Action/Transactio...
生成器模式(Builder)生成器模式(Builder)意图:将一个对...