use of org.prebid.mobile.rendering.bidding.listeners.BannerEventListener in project prebid-mobile-android by prebid.
the class BannerViewTest method onAdServerWin_AdRequestStatusIsFinishedDisplayAdViewAndNotifyAdReceivedListener.
@Test
public void onAdServerWin_AdRequestStatusIsFinishedDisplayAdViewAndNotifyAdReceivedListener() {
changePrimaryAdServerRequestStatus(true);
final View mockView = mock(View.class);
final BannerEventListener bannerEventListener = getBannerEventListener();
bannerEventListener.onAdServerWin(mockView);
assertFalse(mBannerView.isPrimaryAdServerRequestInProgress());
verify(mMockBannerListener, times(1)).onAdLoaded(mBannerView);
// verify(spyBannerView).displayAdServerView(mockView);
}
use of org.prebid.mobile.rendering.bidding.listeners.BannerEventListener in project prebid-mobile-android by prebid.
the class BannerViewTest method onPrebidSdkWin_AdRequestStatusIsFinishedDisplayAdView.
@Test
public void onPrebidSdkWin_AdRequestStatusIsFinishedDisplayAdView() {
changePrimaryAdServerRequestStatus(true);
final BannerEventListener bannerEventListener = getBannerEventListener();
final BidResponse mockBidResponse = mock(BidResponse.class);
final Bid mockBid = mock(Bid.class);
when(mockBidResponse.getWinningBid()).thenReturn(mockBid);
when(mockBidResponse.getWinningBidWidthHeightPairDips(any())).thenReturn(Pair.create(0, 0));
mBannerView.setBidResponse(mockBidResponse);
bannerEventListener.onPrebidSdkWin();
assertFalse(mBannerView.isPrimaryAdServerRequestInProgress());
}
Aggregations