Skip to content

Instantly share code, notes, and snippets.

@stephan-mueller
Last active October 26, 2015 15:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephan-mueller/f581f894fcff48ffec20 to your computer and use it in GitHub Desktop.
Save stephan-mueller/f581f894fcff48ffec20 to your computer and use it in GitHub Desktop.
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