develog

[junit5] assertThatCode, doesNotThrowAnyException, 예외를 발생하지 않음을 체크 본문

카테고리 없음

[junit5] assertThatCode, doesNotThrowAnyException, 예외를 발생하지 않음을 체크

냐옴 2023. 9. 18. 14:21

 

예외가 발생하지 않음을 체크한다

Assertions.assertThatCode(() -> {

    // some code not throw exception

}).doesNotThrowAnyException();
Comments