사용자 도구

사이트 도구


java:assertj

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

다음 판
이전 판
java:assertj [2014/09/09 04:52]
kwon37xi 만듦
java:assertj [2021/09/03 11:22] (현재)
kwon37xi
줄 2: 줄 2:
   * [[java:fest|Fest]]를 이어받은 [[java:junit|JUnit]] Assert 라이브러리.   * [[java:fest|Fest]]를 이어받은 [[java:junit|JUnit]] Assert 라이브러리.
   * http://joel-costigliola.github.io/assertj/   * 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 : <code java>
 +try {
 +    org.assertj.core.api.Assertions.failBecauseExceptionWasNotThrown($ExceptionClass$.class);
 +} catch ($ExceptionClass$ ex) {
 +    org.assertj.core.api.Assertions.assertThat(ex).hasMessage("");
 +}
 +</code>
 +
 +===== 기존 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]]
java/assertj.1410205940.txt.gz · 마지막으로 수정됨: 2014/09/09 04:52 저자 kwon37xi