'Liquibase'에 해당되는 글 1

  1. 2011.01.20 JUnit TestSuite 사용하기

JUnit TestSuite 사용하기

@RunWith(Suite.class)
@SuiteClasses({Test1.class, Test2.class}) //TestCase, TestSuite 가 올 수 있다.
public class AllTests {

    public static Test suite() {
        TestSuite suite = new TestSuite("Test for tt");
        //$JUnit-BEGIN$

        //$JUnit-END$
        return suite;
    }
   
    //@BeforeClass, @AfterClass 는 가장 먼저, 늦게 실행된다.
    //@Before, @After 는 실행 안됨.
}
여기에서 데이터베이스 초기화 작업을 하자.