[导入]The interesting but useful mock assertion in Java

[导入]The interesting but useful mock assertion in Java
在某开源项目里, 发现它使用了一种很有意思的 assertion 机制. 这是一种仿 assertion 的方式来实现对输入参数或特定表达式的判断. 伪代码如下: public final class Assert { private Assert() {} public static void notNull(Object o) { notNull("Null object is used", o); } public static void notNull(String description, Object o) { [...]
文章来源: http://blog.baturu.com/index.php/2009/07/30/the_interesting_but_useful_mock_assertion_in_java.html

你可能感兴趣的:([导入]The interesting but useful mock assertion in Java)