use of org.prebid.mobile.rendering.interstitial.AdInterstitialDialog in project prebid-mobile-android by prebid.
the class InterstitialManagerTest method interstitialClosedAndMraidCollapsed_DoNotNotifyMraidDelegate.
@Test
public void interstitialClosedAndMraidCollapsed_DoNotNotifyMraidDelegate() throws IllegalAccessException {
HTMLCreative mockHtmlCreative = mock(HTMLCreative.class);
AdInterstitialDialog mockAdInterstitialDialog = mock(AdInterstitialDialog.class);
WhiteBox.field(InterstitialManager.class, "mInterstitialDialog").set(mSpyInterstitialManager, mockAdInterstitialDialog);
mSpyInterstitialManager.setInterstitialDisplayDelegate(mockHtmlCreative);
when(mMockMraidDelegate.collapseMraid()).thenReturn(true);
mSpyInterstitialManager.interstitialClosed(null);
verify(mockAdInterstitialDialog, never()).nullifyDialog();
}
use of org.prebid.mobile.rendering.interstitial.AdInterstitialDialog in project prebid-mobile-android by prebid.
the class InterstitialManagerTest method interstitialClosedNullMraidExpand_NullifyDialog.
@Test
public void interstitialClosedNullMraidExpand_NullifyDialog() throws IllegalAccessException {
AdInterstitialDialog mockAdInterstitialDialog = mock(AdInterstitialDialog.class);
WhiteBox.field(InterstitialManager.class, "mInterstitialDialog").set(mSpyInterstitialManager, mockAdInterstitialDialog);
when(mMockMraidDelegate.collapseMraid()).thenReturn(false);
mSpyInterstitialManager.interstitialClosed(null);
verify(mockAdInterstitialDialog, times(1)).nullifyDialog();
}
use of org.prebid.mobile.rendering.interstitial.AdInterstitialDialog in project prebid-mobile-android by prebid.
the class InterstitialManager method showInterstitialDialog.
private void showInterstitialDialog(Context context, InterstitialView interstitialView) {
WebViewBase webViewBase = ((PrebidWebViewInterstitial) interstitialView.getCreativeView()).getWebView();
webViewBase.setId(INTERSTITIAL_WEBVIEW_ID);
mInterstitialDialog = new AdInterstitialDialog(context, webViewBase, interstitialView, this);
mInterstitialDialog.show();
}
Aggregations