Created
February 9, 2016 12:20
-
-
Save srdo/a3584175e47138c87375 to your computer and use it in GitHub Desktop.
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
Set<String> myStrings = new HashSet<>(); | |
myStrings.add("abc"); | |
myStrings.add("def"); | |
Collection<String> otherStrings = new ArrayList<>(); | |
otherStrings.add("def"); | |
assertThat("Expected unequal sets", otherStrings, not(containsInAnyOrder(myStrings))); | |
otherStrings.add("abc"); | |
assertThat("Expected equal sets", otherStrings, containsInAnyOrder(myStrings)); | |
//Fails on the second assert, prints the missing entry in the assertion error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment