Last active
August 29, 2015 14:05
-
-
Save blundell/3d0621e7441d05fcd11f to your computer and use it in GitHub Desktop.
Compare two Intents with FEST
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
import static org.fest.assertions.api.Assertions.assertThat; | |
assertThat(intentOne).usingComparator(new IntentComparator()).isEqualTo(intentTwo); | |
private static class IntentComparator implements Comparator<Intent> { | |
@Override | |
public int compare(Intent left, Intent right) { | |
return left.filterEquals(right) ? 0 : 1; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment