square / assertj-android

A set of AssertJ helpers geared toward testing Android.
https://square.github.io/assertj-android/
Apache License 2.0
1.58k stars 156 forks source link

Assertions for SharedPreferences added. #74

Closed aahlenst closed 11 years ago

aahlenst commented 11 years ago

Would you prefer a message like it's formatted in fest-assert?

java.lang.AssertionError: expecting:
<{'SOME_KEY'='[]', 'ANOTHER_KEY'='["bar","foo"]'}>
 to contain:
<[MapEntry[key='SOME_KEY', value='["foo","bar"]']]>
 but could not find:
<[MapEntry[key='SOME_KEY', value='["foo","bar"]']]>

Or do you generally dislike printing collections in their entirety? I'm just asking so I know for the future.

JakeWharton commented 11 years ago

@aahlenst I'd like to switch to using proper formatted message in the future but I want to switch the whole library at once.

For now I think omitting the entire map and just saying "preferences" is fine.

aahlenst commented 11 years ago

@JakeWharton Would you like to see further changes before merging?