[Java] UnitTest framework
TestDrivenDevelopmentByExample 을 보면 기본적인 사용법을 알 수 있다. CompositePattern을 써서, 여러테스트를 그룹으로 묶을 수 있도록 되어있다.
JUnit template
1 import junit.framework.*;
2
3 public class SomeTest extends TestCase {
4 public static void main(String[] args) {
5 junit.textui.TestRunner.run(SomeTest.class);
6 }
7 public void setUp() {
8 }
9 public void tearDown() {
10 }
11 public void test1() {
12 }
13 }
14
예제코드
JUnit best practices: http://www.javaworld.com/javaworld/jw-12-2000/jw-1221-junit.html
BioHackersNet