Unit Test
zjhgx
Cobol工程师
展开
-
Unit tests with JUnit
<br />By David Neary .<br /> Contents:<br />Why write tests? To test code To document interfaces To locate bugs To fix bugs JUnit How to use it Starting a class Full speed ahead Testing edge cases Conclusion <br />Unit tests with JUnit <转载 2010-10-14 19:54:00 · 848 阅读 · 0 评论 -
Eclipse中使用Junit插件测试
<br /> 测试对于保证软件开发质量有着非常重要的作用,单元测试更是必不可少,JUnit是一个非常强大的单元测试包,可以对一个/多个类的单个/多个方法测试,还可以将不同的TestCase组合成TestSuit,使测试任务自动化。Eclipse同样集成了JUnit,可以非常方便地编写TestCase。 <br /> 我们创建一个Java工程,添加一个example.Hello类,首先我们给Hello类添加一个abs()方法,作用是返回绝对值:<br /><br /> 下一步,我们准备对这个方法进行测转载 2010-10-14 19:52:00 · 597 阅读 · 0 评论