@Test public void onCustomEventInterstitialClicked_whenInterstitialAdListenerIsNull_shouldNotNotifyListener() throws Exception { subject.setInterstitialAdListener(null); subject.onCustomEventInterstitialClicked(); verify(interstitialAdListener, never()).onInterstitialClicked(eq(subject)); }
@Test public void destroy_shouldPreventOnCustomEventInterstitialClickedFromRegisteringClick() throws Exception { subject.setInterstitialView(interstitialView); subject.destroy(); subject.onCustomEventInterstitialClicked(); verify(interstitialView, never()).registerClick(); }
@Test public void onCustomEventInterstitialClicked_shouldRegisterClickAndNotifyListener() throws Exception { subject.setInterstitialView(interstitialView); subject.onCustomEventInterstitialClicked(); verify(interstitialView).registerClick(); verify(interstitialAdListener).onInterstitialClicked(eq(subject)); }