Java/JUnit 썸네일형 리스트형 JUnit 3 단계 JUnit 4를 적용 Annotation으로 적용하여 본다. package test.dao; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; import java.util.List; import logic.Item; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.c.. 더보기 JUnit 2 단계 테스트 클래스에 테스트 메소드 내의 객체는 메소드 마다 생성된다고 한다. 그래소 메소드 내에서 DAO 같은 공유 객체는 한번만 생성되도록 메소드에서 빼내어 보자. 더보기 JUnit 1 단계 1. junit.framework.TestCase TestCase 상속 받고, 2. 테스트가 돌아가는 메소드는 public void 이름은 test~~로 시작해야 한다. 더보기 이전 1 다음