예외가 발생하지 않는지 테스트
방법 // obviously fails: assertThatCode(() -> { throw new Exception("boom!"); }).doesNotThrowAnyException(); 참고 자료 Assert that Runnable does not throw exception. · Issue #943 · assertj/assertj · GitHub
방법 // obviously fails: assertThatCode(() -> { throw new Exception("boom!"); }).doesNotThrowAnyException(); 참고 자료 Assert that Runnable does not throw exception. · Issue #943 · assertj/assertj · GitHub
assertThat(a).containsExactlyInAnyOrderElementsOf(b); 참고 자료 https://www.baeldung.com/java-assert-lists-equality-ignore-order
assertThat(fido).isEqualToComparingFieldByFieldRecursively(fidosClone); 참고 자료 https://www.baeldung.com/introduction-to-assertj
assertThat(actual) .usingRecursiveFieldByFieldElementComparator() .usingElementComparatorIgnoringFields("field_1", "field_2") .isEqualTo(expected) 참고 자료 https://issueexplorer.com/issue/assertj/assertj-core/2263
assertThat(a).hasSize(b.size()).hasSameElementsAs(b); hasSameElementsAs 는 b가 가지고 있는 요소들을 a가 전부 가지고 있는지 확인한다. 하지만 a가 중복된 값을 가지고 있다면 b가 하나만 가지고 있어도 통과가 되기 때문에, hasSize()로 크기 체크도 해야된다. https://www.baeldung.com/java-assert-lists-equality-ignore-order