test (1) 썸네일형 리스트형 [Java] throw Exception 테스트하기 실행 환경(build.gradle) dependencies { testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.2' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.2' testImplementation 'org.assertj:assertj-core:3.24.2' } spring-boot-starter-test가 있다면 바로 jUnit5를 사용할 수 있다. Exception을 throw하는 메서드 생성 public class MyArrayList implements List { ... public T get(int index) { if(index = size) {.. 이전 1 다음