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

ActionBarAssert.isNotShowing() triggers error on themes without an ActionBar #63

Closed marijnvdwerf closed 11 years ago

marijnvdwerf commented 11 years ago

When using a theme based on Theme.Holo.Light.NoActionBar, I expect assertThat(getActivity().getActionBar()).isNotShowing(); to pass. An error is triggered instead: expecting actual not to be null.

JakeWharton commented 11 years ago

isNotShowing and isNull are different things. When you use a theme like .NoTitleBar the action bar is always null whereas calling hide() on a non-null action bar qualifies as not showing.