+ -
当前位置:首页 → 问答吧 → 6->The MockObject Pattern(wangyu522)

6->The MockObject Pattern(wangyu522)

时间:2006-03-27

来源:互联网

6
The MockObject
Pattern
THE RICHNESS OF OBJECT-ORIENTED PROGRAMMING comes in part from the
interconnections and interactions between objects. A single object can encapsulate a complex
subsystem, making otherwise complicated operations as simple as calling a handful of methods.
(The ubiquitous database connection is one such object.)
But often, the interactions between objects are so complex that you become faced with a “chicken
and egg”-like conundrum: how to develop and test a new object that depends on the creation of
many other objects or on some circumstance that is difficult to realize, such as the recreation of an
entire database.
The Problem
How can you easily isolate and test a segment of code that depends on other objects and resources?
How can you recreate one or more objects or application states to validate that your code is operating
properly?

作者: PHPChina   发布时间: 2006-03-26

...

作者: Bantu   发布时间: 2006-03-28

好了,第六章是我的了

作者: wangyun522   发布时间: 2006-03-28

欢迎加入!
请发短信通知管理员:13691498157

作者: PHPChina   发布时间: 2006-03-28

今天总算检查完了,先发上来,看看,不妥的地方再议
http://www.phpchina.cn/bbs/viewt ... &extra=page%3D1

作者: wangyun522   发布时间: 2006-04-09

热门下载

更多