Closed mapyo closed 8 years ago
What if the ImageView isn't displaying a Bitmap?
On Sun, Nov 15, 2015, 6:28 PM mapyo notifications@github.com wrote:
Thank you for this great library!
It's the following methods and passes the test.
Drawable drawable = context.getResources().getDrawable(R.drawable.star); testImageView.setImageDrawable(drawable); assertThat(testImageView).hasDrawable(drawable);
However, the test does not pass to be the following method.
<ImageView android:id="@+id/test_image_view" android:src="@drawable/star" android:layout_width="wrap_content" android:layout_height="match_parent" />
Drawable drawable = context.getResources().getDrawable(R.drawable.star); assertThat(testImageView).hasDrawable(drawable);
So, I fixed hasDrawable by use of Bitmap.
Thank you.
You can view, comment on, or merge this pull request online at:
https://github.com/square/assertj-android/pull/179 Commit Summary
- Fix hasDrawable
File Changes
- M assertj-android/src/main/java/org/assertj/android/api/widget/ImageViewAssert.java https://github.com/square/assertj-android/pull/179/files#diff-0 (13)
Patch Links:
- https://github.com/square/assertj-android/pull/179.patch
- https://github.com/square/assertj-android/pull/179.diff
— Reply to this email directly or view it on GitHub https://github.com/square/assertj-android/pull/179.
Oh, I am sorry. Other Drawables not working. I would be better off closing this pr...
Thank you for this great library!
It's the following methods and passes the test.
However, the test does not pass to be the following method.
So, I fixed hasDrawable by use of Bitmap.
Thank you.