Assertions (JUnit 5.9.1 API)
Assert that all supplied executables do not throw exceptions. If any supplied Executable throws an exception (i.e., a Throwable or any subclass thereof), all remaining executables will still be executed, and all exceptions will be aggregated and reported i
junit.org
JUnit - Assert Methods(1) : https://velog.io/@roycewon/JUnit-Assert-Methods1
JUnit - Assert Methods(1)
JUnit 5 모듈인 Jupiter는 JUnit4에 있는 Assertion method를 포함하여 여러 메소드를 제공한다. Java8에서 추가된 람다와 함께 사용하면 좋다.Assert method는 org.junit.jupiter.api.Assertions 라는 클래
velog.io
JUnit - Assert Methods(2) : https://velog.io/@roycewon/JUnit-Assert-Methods2
JUnit - Assert Methods(2)
condition :condition이 true인 경우 테스트 통과message :테스트 결과가 실패일 때, 화면에 출력될 메시지public class PlayGround { @Test public void Test_1() { int a = 1; int b = 2;
velog.io
JUnit - AssertJ : https://velog.io/@roycewon/JUnit-AssertJ
JUnit - AssertJ
공식 문서 : https://assertj.github.io/doc/특징메서드 체이닝을 지원하여 더 직관적이고 읽기 쉬운 테스트코드를 작성,정확한 에러메세지JUnit이외의 추가적인 메서드 지원BDD 스타일 어센션 지향BDD 스
velog.io
'Language > Java' 카테고리의 다른 글
IllegalArgumentException, IllegalStateException (0) | 2023.02.26 |
---|---|
추상클래스 (0) | 2023.02.19 |
DI(Dependent Injection) 이란? (0) | 2022.12.11 |
AssertJ 사용법 공부 (0) | 2022.11.02 |
Arrays.sort와 Collections.sort의 차이 (0) | 2022.10.03 |