Skip to content

Instantly share code, notes, and snippets.

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