Last active
October 26, 2015 16:14
-
-
Save stephan-mueller/dd67b25adb9327316361 to your computer and use it in GitHub Desktop.
JUnit test to demonstrate hamcrest assertions.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void hamcrestAssertion() throws Exception { | |
String openKnowledge = "offen, kundig, gut!"; | |
MatcherAssert.assertThat(openKnowledge, CoreMatchers.allOf(CoreMatchers.startsWith("offen"), | |
CoreMatchers.containsString("kundig"), | |
CoreMatchers.endsWith("gut!"))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment