Skip to content

Instantly share code, notes, and snippets.

@cajar1988
Last active November 1, 2015 20:30
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save cajar1988/3249c8a8edac59687494 to your computer and use it in GitHub Desktop.
@Rule
public final JUnitSoftAssertions softly = new JUnitSoftAssertions();
@Test
public void firstPersonNameMustBeValid() {
//given
PersonService personService = new PersonService();
//when
Person firstPerson = personService.fetchFirst();
//then
softly.assertThat(firstPerson.getFirstName()).contains("Adam")
.startsWith("A")
.endsWith("m")
.hasSize(7);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment