TweetMediaView extends ViewGroup implements View.OnClickListener { void setAltText(ImageView imageView, String description) { if (!TextUtils.isEmpty(description)) { imageView.setContentDescription(description); } else { imageView.setContentDescription(getResources().getString(R.string.tw__tweet_media)); } } TweetMediaView(Context context);  TweetMediaView(Context context, AttributeSet attrs);   TweetMediaView(Context context, AttributeSet attrs, DependencyProvider dependencyProvider); void setRoundedCornersRadii(int topLeft, int topRight, int bottomRight, int bottomLeft); void setMediaBgColor(int mediaBgColor); void setTweetMediaClickListener(TweetMediaClickListener tweetMediaClickListener); void setPhotoErrorResId(int photoErrorResId); @Override void onClick(View view); void launchVideoPlayer(MediaEntity entity); void launchVideoPlayer(Tweet tweet); void launchPhotoGallery(int mediaEntityIndex); void setTweetMediaEntities(Tweet tweet, List<MediaEntity> mediaEntities); void setVineCard(Tweet tweet);  }
@Test public void testSetAltText_withEmptyString() { final OverlayImageView imageView = mock(OverlayImageView.class); tweetMediaView.setAltText(imageView, ""); verify(imageView).setContentDescription(contentDefaultDescription); }
@Test public void testSetAltText_withAtlText() { final OverlayImageView imageView = mock(OverlayImageView.class); tweetMediaView.setAltText(imageView, TEST_ALT_TEXT); verify(imageView).setContentDescription(TEST_ALT_TEXT); }