Skip to content

Instantly share code, notes, and snippets.

@blundell
Last active August 29, 2015 14:05
Show Gist options
  • Save blundell/3d0621e7441d05fcd11f to your computer and use it in GitHub Desktop.
Save blundell/3d0621e7441d05fcd11f to your computer and use it in GitHub Desktop.
Compare two Intents with FEST
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