use of org.prebid.mobile.rendering.bidding.listeners.BidRequesterListener in project prebid-mobile-android by prebid.
the class BaseInterstitialAdUnitTest method loadAdWithError_BidResponseIsNull.
@Test
public void loadAdWithError_BidResponseIsNull() {
BidResponse bidResponse = mBaseInterstitialAdUnit.getBidResponse();
assertNull(bidResponse);
final AdException adException = mock(AdException.class);
BidRequesterListener listener = getBidRequesterListener();
listener.onError(adException);
mBaseInterstitialAdUnit.loadAd();
bidResponse = mBaseInterstitialAdUnit.getBidResponse();
assertNull(bidResponse);
}
use of org.prebid.mobile.rendering.bidding.listeners.BidRequesterListener in project prebid-mobile-android by prebid.
the class BaseInterstitialAdUnitTest method loadAd_BidResponseIsInitialized.
@Test
public void loadAd_BidResponseIsInitialized() {
BidResponse bidResponse = mBaseInterstitialAdUnit.getBidResponse();
assertNull(bidResponse);
final BidResponse mockBidResponse = mock(BidResponse.class);
final Bid mockBid = mock(Bid.class);
when(mockBidResponse.getWinningBid()).thenReturn(mockBid);
BidRequesterListener listener = getBidRequesterListener();
listener.onFetchCompleted(mockBidResponse);
mBaseInterstitialAdUnit.loadAd();
BidResponse actualBidResponse = mBaseInterstitialAdUnit.getBidResponse();
assertEquals(mockBidResponse, actualBidResponse);
}
use of org.prebid.mobile.rendering.bidding.listeners.BidRequesterListener in project prebid-mobile-android by prebid.
the class RewardedAdUnitTest method onError_RequestAdWitNullBid.
@Test
public void onError_RequestAdWitNullBid() {
BidRequesterListener listener = getBidRequesterListener();
listener.onError(any());
verify(mMockRewardedEventHandler, times(1)).requestAdWithBid(eq(null));
}
Aggregations