Search in sources :

Example 1 with AdViewManagerListener

use of org.prebid.mobile.rendering.views.AdViewManagerListener in project prebid-mobile-android by prebid.

the class DisplayViewTest method whenAdViewManagerListenerAdLoaded_NotifyListenerOnAdLoaded.

@Test
public void whenAdViewManagerListenerAdLoaded_NotifyListenerOnAdLoaded() throws IllegalAccessException {
    AdViewManagerListener adViewManagerListener = getAdViewManagerListener();
    adViewManagerListener.adLoaded(mock(AdDetails.class));
    verify(mMockDisplayViewListener).onAdLoaded();
}
Also used : AdDetails(org.prebid.mobile.rendering.models.AdDetails) AdViewManagerListener(org.prebid.mobile.rendering.views.AdViewManagerListener) Test(org.junit.Test)

Example 2 with AdViewManagerListener

use of org.prebid.mobile.rendering.views.AdViewManagerListener in project prebid-mobile-android by prebid.

the class DisplayViewTest method whenAdViewManagerListenerViewReadyForImmediateDisplay_NotifyListenerOnAdDisplayed.

@Test
public void whenAdViewManagerListenerViewReadyForImmediateDisplay_NotifyListenerOnAdDisplayed() throws IllegalAccessException {
    AdViewManagerListener adViewManagerListener = getAdViewManagerListener();
    adViewManagerListener.viewReadyForImmediateDisplay(mock(View.class));
    verify(mMockDisplayViewListener).onAdDisplayed();
}
Also used : View(android.view.View) AdViewManagerListener(org.prebid.mobile.rendering.views.AdViewManagerListener) Test(org.junit.Test)

Example 3 with AdViewManagerListener

use of org.prebid.mobile.rendering.views.AdViewManagerListener in project prebid-mobile-android by prebid.

the class DisplayViewTest method whenAdViewManagerListenerCreativeDidCollapse_NotifyListenerOnAdClosed.

@Test
public void whenAdViewManagerListenerCreativeDidCollapse_NotifyListenerOnAdClosed() throws IllegalAccessException {
    AdViewManagerListener adViewManagerListener = getAdViewManagerListener();
    adViewManagerListener.creativeCollapsed();
    verify(mMockDisplayViewListener).onAdClosed();
}
Also used : AdViewManagerListener(org.prebid.mobile.rendering.views.AdViewManagerListener) Test(org.junit.Test)

Example 4 with AdViewManagerListener

use of org.prebid.mobile.rendering.views.AdViewManagerListener in project prebid-mobile-android by prebid.

the class DisplayViewTest method whenAdViewManagerListenerFailedToLoad_NotifyListenerOnAdFailed.

@Test
public void whenAdViewManagerListenerFailedToLoad_NotifyListenerOnAdFailed() throws IllegalAccessException {
    AdViewManagerListener adViewManagerListener = getAdViewManagerListener();
    adViewManagerListener.failedToLoad(new AdException(AdException.INTERNAL_ERROR, "Test"));
    verify(mMockDisplayViewListener).onAdFailed(any(AdException.class));
}
Also used : AdViewManagerListener(org.prebid.mobile.rendering.views.AdViewManagerListener) AdException(org.prebid.mobile.rendering.errors.AdException) Test(org.junit.Test)

Example 5 with AdViewManagerListener

use of org.prebid.mobile.rendering.views.AdViewManagerListener in project prebid-mobile-android by prebid.

the class DisplayViewTest method whenAdViewManagerListenerCreativeWasClicked_NotifyListenerOnAdClicked.

@Test
public void whenAdViewManagerListenerCreativeWasClicked_NotifyListenerOnAdClicked() throws IllegalAccessException {
    AdViewManagerListener adViewManagerListener = getAdViewManagerListener();
    adViewManagerListener.creativeClicked("");
    verify(mMockDisplayViewListener).onAdClicked();
}
Also used : AdViewManagerListener(org.prebid.mobile.rendering.views.AdViewManagerListener) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)6 AdViewManagerListener (org.prebid.mobile.rendering.views.AdViewManagerListener)6 View (android.view.View)1 AdException (org.prebid.mobile.rendering.errors.AdException)1 AdDetails (org.prebid.mobile.rendering.models.AdDetails)1