@Test public void onBannerLoaded_shouldSignalMoPubView() throws Exception { View view = new View(Robolectric.buildActivity(Activity.class).create().get()); subject.onBannerLoaded(view); verify(moPubView).nativeAdLoaded(); verify(moPubView).setAdContentView(eq(view)); verify(moPubView).trackNativeImpression(); }
@Override public void onBannerLoaded(View bannerView) { if (isInvalidated()) { return; } cancelTimeout(); if (mMoPubView != null) { mMoPubView.nativeAdLoaded(); mMoPubView.setAdContentView(bannerView); if (!(bannerView instanceof HtmlBannerWebView)) { mMoPubView.trackNativeImpression(); } } }
CustomEventBannerAdapter implements CustomEventBannerListener { @Override public void onBannerLoaded(View bannerView) { if (isInvalidated()) { return; } cancelTimeout(); if (mMoPubView != null) { mMoPubView.nativeAdLoaded(); mMoPubView.setAdContentView(bannerView); if (!(bannerView instanceof HtmlBannerWebView)) { mMoPubView.trackNativeImpression(); } } } }
CustomEventBannerAdapter implements CustomEventBannerListener { @Override public void onBannerLoaded(View bannerView) { if (isInvalidated()) { return; } cancelTimeout(); if (mMoPubView != null) { mMoPubView.nativeAdLoaded(); mMoPubView.setAdContentView(bannerView); if (!(bannerView instanceof HtmlBannerWebView)) { mMoPubView.trackNativeImpression(); } } } CustomEventBannerAdapter(@NonNull MoPubView moPubView,
            @NonNull String className,
            @NonNull Map<String, String> serverExtras,
            long broadcastIdentifier,
            @Nullable AdReport adReport); }
CustomEventBannerAdapter implements CustomEventBannerListener { @Override public void onBannerLoaded(View bannerView) { if (isInvalidated()) { return; } cancelTimeout(); if (mMoPubView != null) { mMoPubView.nativeAdLoaded(); mMoPubView.setAdContentView(bannerView); if (!(bannerView instanceof HtmlBannerWebView)) { mMoPubView.trackNativeImpression(); } } } CustomEventBannerAdapter(@NonNull MoPubView moPubView,
            @NonNull String className,
            @NonNull Map<String, String> serverExtras,
            long broadcastIdentifier,
            @Nullable AdReport adReport); @Override void onBannerLoaded(View bannerView); @Override void onBannerFailed(MoPubErrorCode errorCode); @Override void onBannerExpanded(); @Override void onBannerCollapsed(); @Override void onBannerClicked(); @Override void onLeaveApplication(); }
CustomEventBannerAdapter implements CustomEventBannerListener { @Override public void onBannerLoaded(View bannerView) { if (isInvalidated()) { return; } cancelTimeout(); if (mMoPubView != null) { mMoPubView.nativeAdLoaded(); mMoPubView.setAdContentView(bannerView); if (!(bannerView instanceof HtmlBannerWebView)) { mMoPubView.trackNativeImpression(); } } } CustomEventBannerAdapter(@NonNull MoPubView moPubView,
            @NonNull String className,
            @NonNull Map<String, String> serverExtras,
            long broadcastIdentifier,
            @Nullable AdReport adReport); @Override void onBannerLoaded(View bannerView); @Override void onBannerFailed(MoPubErrorCode errorCode); @Override void onBannerExpanded(); @Override void onBannerCollapsed(); @Override void onBannerClicked(); @Override void onLeaveApplication(); static final int DEFAULT_BANNER_TIMEOUT_DELAY; }