Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
JUnit test to demonstrate AssertJ assertions.
@Test
public void assertjAssertion() throws Exception {
String openKnowledge = "offen, kundig, gut!";
Assertions.assertThat(openKnowledge).startsWith("offen").contains("kundig").endsWith("gut!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment