Search in sources :

Example 1 with VideoPlacementType

use of org.prebid.mobile.rendering.bidding.enums.VideoPlacementType in project prebid-mobile-android by prebid.

the class BannerView method setVideoPlacementType.

public void setVideoPlacementType(VideoPlacementType videoPlacement) {
    mAdUnitConfig.setAdUnitIdentifierType(AdConfiguration.AdUnitIdentifierType.VAST);
    final PlacementType placementType = VideoPlacementType.mapToPlacementType(videoPlacement);
    mAdUnitConfig.setPlacementType(placementType);
}
Also used : PlacementType(org.prebid.mobile.rendering.models.PlacementType) VideoPlacementType(org.prebid.mobile.rendering.bidding.enums.VideoPlacementType)

Example 2 with VideoPlacementType

use of org.prebid.mobile.rendering.bidding.enums.VideoPlacementType in project prebid-mobile-android by prebid.

the class BannerViewTest method setVideoPlacementType_AdUnitIdentifierTypeIsVASTAndVideoPlacementIsUpdated.

@Test
public void setVideoPlacementType_AdUnitIdentifierTypeIsVASTAndVideoPlacementIsUpdated() throws IllegalAccessException {
    final VideoPlacementType videoPlacement = VideoPlacementType.IN_BANNER;
    AdConfiguration mockAdConfiguration = mock(AdConfiguration.class);
    WhiteBox.field(BannerView.class, "mAdUnitConfig").set(mBannerView, mockAdConfiguration);
    mBannerView.setVideoPlacementType(videoPlacement);
    verify(mockAdConfiguration, times(1)).setPlacementType(eq(VideoPlacementType.mapToPlacementType(videoPlacement)));
    verify(mockAdConfiguration, times(1)).setAdUnitIdentifierType(eq(AdConfiguration.AdUnitIdentifierType.VAST));
}
Also used : AdConfiguration(org.prebid.mobile.rendering.models.AdConfiguration) VideoPlacementType(org.prebid.mobile.rendering.bidding.enums.VideoPlacementType) Test(org.junit.Test)

Aggregations

VideoPlacementType (org.prebid.mobile.rendering.bidding.enums.VideoPlacementType)2 Test (org.junit.Test)1 AdConfiguration (org.prebid.mobile.rendering.models.AdConfiguration)1 PlacementType (org.prebid.mobile.rendering.models.PlacementType)1