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);
}
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));
}
Aggregations