@Test public void getAdView_shouldCreateHtmlInterstitialWebViewAndLoadResponse() throws Exception { resetMockedView(htmlInterstitialWebView); subject.getAdView(); assertThat(TestHtmlInterstitialWebViewFactory.getLatestListener()).isNotNull(); assertThat(TestHtmlInterstitialWebViewFactory.getLatestIsScrollable()).isEqualTo(EXPECTED_IS_SCROLLABLE); assertThat(TestHtmlInterstitialWebViewFactory.getLatestRedirectUrl()).isEqualTo(EXPECTED_REDIRECT_URL); assertThat(TestHtmlInterstitialWebViewFactory.getLatestClickthroughUrl()).isEqualTo(EXPECTED_CLICKTHROUGH_URL); verify(htmlInterstitialWebView).loadHtmlResponse(EXPECTED_HTML_DATA); }
@Override public View getAdView() { Intent intent = getIntent(); boolean isScrollable = intent.getBooleanExtra(SCROLLABLE_KEY, false); String redirectUrl = intent.getStringExtra(REDIRECT_URL_KEY); String clickthroughUrl = intent.getStringExtra(CLICKTHROUGH_URL_KEY); String htmlResponse = intent.getStringExtra(HTML_RESPONSE_BODY_KEY); mHtmlInterstitialWebView = HtmlInterstitialWebViewFactory.create(getApplicationContext(), mAdReport, new BroadcastingInterstitialListener(), isScrollable, redirectUrl, clickthroughUrl); mHtmlInterstitialWebView.loadHtmlResponse(htmlResponse); return mHtmlInterstitialWebView; }
MoPubActivity extends BaseInterstitialActivity { @Override public View getAdView() { Intent intent = getIntent(); boolean isScrollable = intent.getBooleanExtra(SCROLLABLE_KEY, false); String redirectUrl = intent.getStringExtra(REDIRECT_URL_KEY); String clickthroughUrl = intent.getStringExtra(CLICKTHROUGH_URL_KEY); String htmlResponse = intent.getStringExtra(HTML_RESPONSE_BODY_KEY); mHtmlInterstitialWebView = HtmlInterstitialWebViewFactory.create(getApplicationContext(), mAdReport, new BroadcastingInterstitialListener(), isScrollable, redirectUrl, clickthroughUrl); mHtmlInterstitialWebView.loadHtmlResponse(htmlResponse); return mHtmlInterstitialWebView; } }
MoPubActivity extends BaseInterstitialActivity { @Override public View getAdView() { Intent intent = getIntent(); boolean isScrollable = intent.getBooleanExtra(SCROLLABLE_KEY, false); String redirectUrl = intent.getStringExtra(REDIRECT_URL_KEY); String clickthroughUrl = intent.getStringExtra(CLICKTHROUGH_URL_KEY); String htmlResponse = intent.getStringExtra(HTML_RESPONSE_BODY_KEY); mHtmlInterstitialWebView = HtmlInterstitialWebViewFactory.create(getApplicationContext(), mAdReport, new BroadcastingInterstitialListener(), isScrollable, redirectUrl, clickthroughUrl); mHtmlInterstitialWebView.loadHtmlResponse(htmlResponse); return mHtmlInterstitialWebView; }  }
MoPubActivity extends BaseInterstitialActivity { @Override public View getAdView() { Intent intent = getIntent(); boolean isScrollable = intent.getBooleanExtra(SCROLLABLE_KEY, false); String redirectUrl = intent.getStringExtra(REDIRECT_URL_KEY); String clickthroughUrl = intent.getStringExtra(CLICKTHROUGH_URL_KEY); String htmlResponse = intent.getStringExtra(HTML_RESPONSE_BODY_KEY); mHtmlInterstitialWebView = HtmlInterstitialWebViewFactory.create(getApplicationContext(), mAdReport, new BroadcastingInterstitialListener(), isScrollable, redirectUrl, clickthroughUrl); mHtmlInterstitialWebView.loadHtmlResponse(htmlResponse); return mHtmlInterstitialWebView; }  static void start(Context context, String htmlData, AdReport adReport,
            boolean isScrollable, String redirectUrl, String clickthroughUrl,
            CreativeOrientation creativeOrientation, long broadcastIdentifier); @Override View getAdView(); }
MoPubActivity extends BaseInterstitialActivity { @Override public View getAdView() { Intent intent = getIntent(); boolean isScrollable = intent.getBooleanExtra(SCROLLABLE_KEY, false); String redirectUrl = intent.getStringExtra(REDIRECT_URL_KEY); String clickthroughUrl = intent.getStringExtra(CLICKTHROUGH_URL_KEY); String htmlResponse = intent.getStringExtra(HTML_RESPONSE_BODY_KEY); mHtmlInterstitialWebView = HtmlInterstitialWebViewFactory.create(getApplicationContext(), mAdReport, new BroadcastingInterstitialListener(), isScrollable, redirectUrl, clickthroughUrl); mHtmlInterstitialWebView.loadHtmlResponse(htmlResponse); return mHtmlInterstitialWebView; }  static void start(Context context, String htmlData, AdReport adReport,
            boolean isScrollable, String redirectUrl, String clickthroughUrl,
            CreativeOrientation creativeOrientation, long broadcastIdentifier); @Override View getAdView();  }