TestNG 기반 유닛 테스트로 변환할 수 있는 JUnit 기반 테스트 클래스를 보고합니다.

예:


import org.junit.Test;
import static org.junit.Assert.*;

public class ExampleTest {
  @Test
  public void testExample(){
    assertEquals(2 + 2, 4);
  }
}

빠른 수정 적용 후:


import org.testng.Assert;
import org.testng.annotations.Test;

public class ExampleTest {
  @Test
  public void testExample(){
    Assert.assertEquals(4, 2 + 2);
  }
}