Skip to content

AssertJ's "soft" assertions assert hard on fail() invocations #3275

Closed Answered by NadChel
NadChel asked this question in Q&A
Discussion options

You must be logged in to vote

I should've called those inside the lambda. Consider it closed

@Test
void testSoftAssertions() {
  SoftAssertions.assertSoftly(soft -> {
      soft.fail("Ka-boom! Index: 1");
      soft.fail("Ka-boom! Index: 2");
      soft.fail("Ka-boom! Index: 3");
  });
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by joel-costigliola
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant