像Contract4J这样的契约式设计工具在单元测试比较分散或比较困难的时候最有帮助。
A Design by Contract tool like Contract4J is most helpful in situations where unit testing is sparse or difficult.
契约式设计也做了显式的合约定义,而在单元测试中这些更隐式。
Design by contract also makes explicit the contract definition that is more implicit in unit tests.
正如前面提到过的,单元测试和契约式设计用不同的方式实现类似的目标。
As previously noted, it is true that unit testing and Design by Contract accomplish similar objectives by different means.
应用推荐