====== AssertJ ====== * [[java:fest|Fest]]를 이어받은 [[java:junit|JUnit]] Assert 라이브러리. * http://joel-costigliola.github.io/assertj/ * [[http://www.baeldung.com/assertJ-for-guava|AssertJ for Guava]] * [[http://blog.codeleak.pl/2015/09/assertjs-softassertions-do-we-need-them.html|AssertJ's SoftAssertions - do we need them?]] * [[http://www.baeldung.com/assertJ-java-8-features|AssertJ’s Java 8 Features]] ===== IntelliJ Live Template for try/catch ===== * abbrevication : ''trytestassertj'' * ''Reformat according to Style'' : check * ''Use static import if possible'' : check * ''Shorten FQ names'' : check * ''Applicable in Java: statement'' * Template text : try { org.assertj.core.api.Assertions.failBecauseExceptionWasNotThrown($ExceptionClass$.class); } catch ($ExceptionClass$ ex) { org.assertj.core.api.Assertions.assertThat(ex).hasMessage(""); } ===== 기존 JUnit assert를 AssertJ로 변경하기 ===== * [[http://joel-costigliola.github.io/assertj/assertj-core-converting-junit-assertions-to-assertj.html|AssertJ / Fluent assertions for java]] ===== assertj-json ===== * https://github.com/revinate/assertj-json * [[java:json_path|json path]] 를 사용해 assertj 에서 JSON assert * **개발이 중단 되었는지 최신 버전 assertj**와 API 호환이 안됨. ===== 참고 ===== * [[https://www.baeldung.com/introduction-to-assertj|Introduction to AssertJ | Baeldung]] * [[http://www.baeldung.com/assertj-custom-assertion|Custom Assertions with AssertJ | Baeldung]] * [[https://joel-costigliola.github.io/assertj/assertj-core-features-highlight.html|AssertJ / Fluent assertions for java]] * [[https://pjh3749.tistory.com/241|[AssertJ] JUnit과 같이 쓰기 좋은 AssertJ 필수 부분 정리]] * [[https://www.vogella.com/tutorials/AssertJ/article.html|Testing with AssertJ assertions - Tutorial]] * [[https://www.baeldung.com/assertj-conditions|Using Conditions with AssertJ Assertions | Baeldung]] * [[https://www.baeldung.com/assertj-exception-assertion|AssertJ Exception Assertions | Baeldung]]