摘要:
1.导入junit包,2.测试方法格式public void test_*(){}继承 TestCase 包(keep the bar green to keep the code clean)单元测试不是为了证明你是对的,而是证明你没有错误。http://junit.org/ 阅读全文
posted @ 2013-06-28 01:51
忍性而为
阅读(140)
评论(0)
推荐(0)
摘要:
包含成员变量及方法的注解称之为元数据,不包含任何成员的注解称之为标记。用@interface定义注解,使用类似于接口方法的方式来定义注解的属性,其中返回值成为属性的类型,方法名为属性的名称。public @interface HelloAnnocation(){ public String name();}调用注解:@HelloAnnocation(name="abc") 可以修饰类,属性方法jdk的元Annocation用于修饰Annocation定义 阅读全文
posted @ 2013-06-28 01:19
忍性而为
阅读(135)
评论(0)
推荐(0)