@Test public void generated_soft_assertions_example() throws NameException { // use the generated soft assertions SoftAssertions softly = new SoftAssertions(); softly.assertThat(rose).hasName(new Name("Derrick", "Rose")).hasTeamMates(noah); softly.assertAll(); }
@Test public void generated_soft_assertions_errors_example() throws NameException { // use the generated soft assertions SoftAssertions softly = new SoftAssertions(); try { softly.assertThat(rose).hasName(new Name("Michael", "Jordan")).hasTeam("Lakers"); softly.assertAll(); } catch (SoftAssertionError e) { logAssertionErrorMessage("GeneratedSoftAssertions errors example", e); } }