惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Vulnerabilities – Threatpost
T
The Blog of Author Tim Ferriss
S
SegmentFault 最新的问题
D
DataBreaches.Net
博客园_首页
罗磊的独立博客
B
Blog
T
Threat Research - Cisco Blogs
C
Cisco Blogs
GbyAI
GbyAI
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
G
GRAHAM CLULEY
H
Help Net Security
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
爱范儿
爱范儿
SecWiki News
SecWiki News
T
Threatpost
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Schneier on Security
Schneier on Security
T
The Exploit Database - CXSecurity.com
Google Online Security Blog
Google Online Security Blog
T
Tor Project blog
小众软件
小众软件
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Y
Y Combinator Blog
H
Hacker News: Front Page
V
V2EX
Security Latest
Security Latest
Cloudbric
Cloudbric
Simon Willison's Weblog
Simon Willison's Weblog
Attack and Defense Labs
Attack and Defense Labs
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Proofpoint News Feed
博客园 - 三生石上(FineUI控件)
NISL@THU
NISL@THU
S
Secure Thoughts
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
V2EX - 技术
V2EX - 技术
Vercel News
Vercel News
P
Palo Alto Networks Blog
IT之家
IT之家
MyScale Blog
MyScale Blog
有赞技术团队
有赞技术团队
Application and Cybersecurity Blog
Application and Cybersecurity Blog
D
Docker
Google DeepMind News
Google DeepMind News
Webroot Blog
Webroot Blog

博客园 - epan

www.smallsocial.com 一晃眼这个blog已经丢弃两年。。。 自动调节img宽度的脚本 寻找开源的P2P视频点播系统 为什么vs2005内置Web application server中调用COM组件时正常,在IIS中运行时组件创建失败? XML节点存在namespace(xmlns)的时候xpath不能正常工作 用ASP.NET缓存提高站点性能【转载】 ADO.NET实用经验无保留曝光 (四)【转载】 ADO.NET实用经验无保留曝光 (三)【转载】 ADO.NET实用经验无保留曝光 (二)【转载】 ADO.NET实用经验无保留曝光(一)【转载】 使用MasterPage遇到的问题 - epan - 博客园 在VS.NET2003中无法新建C#项 最近迷上了淘宝,好像真的有免费的午餐一样。。。 Where to go??? 《鬼谷子》 鬼谷子本经阴符七术 《老子》 我又做了一件不可思议的事。。。
请教vs2005中单元测试时测试一个返回对象的方法应该怎么做? - epan - 博客园
epan · 2006-09-08 · via 博客园 - epan

比如有一个方法:
public Message GenerateMessage(MyException ex)
{
.........//Generate Message Object and return.
}
Message 是一个封装信息的实体类。

写测试方法的时候,是对Message中的字段进行判断?
Message expected=new Message();
expected.ID="ERROR_ID";
.
.
.
Message actual=GenerateMessage(new MyException("ERROR_ID"));
Assert.AreEqual(Message.ID,actual.ID)
.
.
.
有没有这方面比较好的文章介绍?谢谢。

posted @ 2006-09-08 22:39  epan  阅读(930)  评论(0)    收藏  举报

刷新页面返回顶部