Contract Test

原创 2005年03月03日 18:12:00

Diaspar wrote in Contract Test:
Contract Tests explain how a class should extend a superclass or implement and interface, so that I don't have to read a bunch of prose to figure out how to do that.

一直困扰我的关于如何告诉其他人正确使用我写的基类的问题,通过contract test即可以较好的解决:

Typically, a contract test case class is abstract, then I extend it and implement a creation method or two to return instances of my own implementation of the given interface. That gives me a standard battery of tests I can run to drive my implementation. It might not be perfect (I'll have n failing tests to start) but I prefer it to documentation written in prose.

So if you're delivering something you want me to extend and I need to follow more than three rules, please deliver me some contract tests.

又google了一下,找到Joe Walnes一篇相关的Blog:Design by contract: testing implementations of interfaces

版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

property sales contract

  • 2011-07-01 14:52
  • 20KB
  • 下载

win8搜索Contract

  • 2012-12-04 16:54
  • 1.36MB
  • 下载

WCF学习笔记——契约(Contract)

什么是契约或者契约的用处是么? 任何的一个分布式应用程序,关键之处就在于相互之间消息的传递。那么要想传递消息就不能是我说英语你说中文吧,所以需要实现定义好数据交换规则。这样契约的作用就是就是表示这个...

比较器报错:Comparison method violates its general contract

转载自:http://blog.csdn.net/fanzitao/article/details/8040201 Brother Zeng遇到的错误: java.lang.Illeg...
  • memray
  • memray
  • 2013-12-27 22:52
  • 3258

spring security 的contract实例

  • 2013-01-30 10:41
  • 6.71MB
  • 下载

Obey the general contract when overriding equals

看了effective java的遵守equal函数覆盖约定这一章,第一感觉是看英文原版太尼玛累了,这本书很多次

property contract 1

  • 2011-07-01 14:28
  • 13KB
  • 下载
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)