use of org.prebid.mobile.rendering.bidding.data.bid.Prebid in project prebid-mobile-android by prebid.
the class GamBannerEventHandlerTest method requestAdWithDifferentBids_VerifyAdStatus.
@Test
public void requestAdWithDifferentBids_VerifyAdStatus() {
final Bid mockBid = mock(Bid.class);
final Prebid mockPrebid = mock(Prebid.class);
when(mockPrebid.getTargeting()).thenReturn(new HashMap<>());
when(mockBid.getPrebid()).thenReturn(mockPrebid);
when(mockBid.getPrice()).thenReturn(0.2);
mBannerEventHandler.requestAdWithBid(mockBid);
assertTrue(getExpectingAppEventStatus());
when(mockBid.getPrice()).thenReturn(0.0);
mBannerEventHandler.requestAdWithBid(mockBid);
assertFalse(getExpectingAppEventStatus());
mBannerEventHandler.requestAdWithBid(null);
assertFalse(getExpectingAppEventStatus());
}
use of org.prebid.mobile.rendering.bidding.data.bid.Prebid in project prebid-mobile-android by prebid.
the class GamInterstitialEventHandlerTest method requestAdWithDifferentBids_VerifyAdStatus.
@Test
public void requestAdWithDifferentBids_VerifyAdStatus() {
final Bid mockBid = mock(Bid.class);
final Prebid mockPrebid = mock(Prebid.class);
when(mockPrebid.getTargeting()).thenReturn(new HashMap<>());
when(mockBid.getPrebid()).thenReturn(mockPrebid);
when(mockBid.getPrice()).thenReturn(0.2);
mEventHandler.requestAdWithBid(mockBid);
assertTrue(getExpectingAppEventStatus());
when(mockBid.getPrice()).thenReturn(0.0);
mEventHandler.requestAdWithBid(mockBid);
assertFalse(getExpectingAppEventStatus());
mEventHandler.requestAdWithBid(null);
assertFalse(getExpectingAppEventStatus());
}
use of org.prebid.mobile.rendering.bidding.data.bid.Prebid in project prebid-mobile-android by prebid.
the class GamRewardedEventHandlerTest method requestAdWithDifferentBids_VerifyAdStatus.
@Test
public void requestAdWithDifferentBids_VerifyAdStatus() {
final Bid mockBid = mock(Bid.class);
final Prebid mockPrebid = mock(Prebid.class);
when(mockPrebid.getTargeting()).thenReturn(new HashMap<>());
when(mockBid.getPrebid()).thenReturn(mockPrebid);
when(mockBid.getPrice()).thenReturn(0.2);
mEventHandler.requestAdWithBid(mockBid);
assertTrue(getExpectingAppEventStatus());
when(mockBid.getPrice()).thenReturn(0.0);
mEventHandler.requestAdWithBid(mockBid);
assertFalse(getExpectingAppEventStatus());
mEventHandler.requestAdWithBid(null);
assertFalse(getExpectingAppEventStatus());
}