HtmlBannerWebView extends BaseHtmlWebView { public void init(CustomEventBannerListener customEventBannerListener, boolean isScrollable, String redirectUrl, String clickthroughUrl) { super.init(isScrollable); setWebViewClient(new HtmlWebViewClient(new HtmlBannerWebViewListener(customEventBannerListener), this, clickthroughUrl, redirectUrl)); } HtmlBannerWebView(Context context, AdConfiguration adConfiguration); void init(CustomEventBannerListener customEventBannerListener, boolean isScrollable, String redirectUrl, String clickthroughUrl); static final String EXTRA_AD_CLICK_DATA; }
@Test public void init_shouldSetupWebViewClient() throws Exception { subject.init(customEventBannerListener, false, clickthroughUrl, redirectUrl); WebViewClient webViewClient = shadowOf(subject).getWebViewClient(); assertThat(webViewClient).isNotNull(); assertThat(webViewClient).isInstanceOf(HtmlWebViewClient.class); }