@Test public void extractTrackUrls() { Map<TrackEventType, List<String>> trackUrls = adRequest.trackUrls; assertNull(trackUrls); adRequest.extractTrackUrls(null); trackUrls = adRequest.trackUrls; assertNull(trackUrls); Response.Seatbid.Bid bid = Response.Seatbid.Bid.newBuilder().build(); adRequest.extractTrackUrls(bid); trackUrls = adRequest.trackUrls; assertNotNull(trackUrls); assertEquals(0, trackUrls.size()); bid = Response.Seatbid.Bid.newBuilder() .setPurl("test_url_win") .setLurl("test_url_loss") .build(); adRequest.extractTrackUrls(bid); trackUrls = adRequest.trackUrls; assertNotNull(trackUrls); assertEquals(2, trackUrls.size()); List<String> urlList = trackUrls.get(TrackEventType.MediationWin); assertNotNull(urlList); assertEquals(1, urlList.size()); assertEquals("test_url_win", urlList.get(0)); urlList = trackUrls.get(TrackEventType.MediationLoss); assertNotNull(urlList); assertEquals(1, urlList.size()); assertEquals("test_url_loss", urlList.get(0)); }
@VisibleForTesting void extractTrackUrls(@Nullable Response.Seatbid.Bid bid) { if (bid == null) { return; } trackUrls = new EnumMap<>(TrackEventType.class); OrtbUtils.addEvent(trackUrls, TrackEventType.MediationWin, bid.getPurl()); OrtbUtils.addEvent(trackUrls, TrackEventType.MediationLoss, bid.getLurl()); }
AdRequest { @VisibleForTesting void extractTrackUrls(@Nullable Response.Seatbid.Bid bid) { if (bid == null) { return; } trackUrls = new EnumMap<>(TrackEventType.class); OrtbUtils.addEvent(trackUrls, TrackEventType.MediationWin, bid.getPurl()); OrtbUtils.addEvent(trackUrls, TrackEventType.MediationLoss, bid.getLurl()); } }
AdRequest { @VisibleForTesting void extractTrackUrls(@Nullable Response.Seatbid.Bid bid) { if (bid == null) { return; } trackUrls = new EnumMap<>(TrackEventType.class); OrtbUtils.addEvent(trackUrls, TrackEventType.MediationWin, bid.getPurl()); OrtbUtils.addEvent(trackUrls, TrackEventType.MediationLoss, bid.getLurl()); } protected  AdRequest(@NonNull AdsType adsType); }
AdRequest { @VisibleForTesting void extractTrackUrls(@Nullable Response.Seatbid.Bid bid) { if (bid == null) { return; } trackUrls = new EnumMap<>(TrackEventType.class); OrtbUtils.addEvent(trackUrls, TrackEventType.MediationWin, bid.getPurl()); OrtbUtils.addEvent(trackUrls, TrackEventType.MediationLoss, bid.getLurl()); } protected  AdRequest(@NonNull AdsType adsType); @Nullable @SuppressWarnings("WeakerAccess") AuctionResult getAuctionResult(); void request(@NonNull final android.content.Context context); void notifyMediationWin(); void notifyMediationLoss(); @SuppressWarnings("WeakerAccess") boolean isExpired(); @SuppressWarnings("WeakerAccess") void addListener(@Nullable AdRequestListener<SelfType> listener); @SuppressWarnings("WeakerAccess") void removeListener(@Nullable AdRequestListener<SelfType> listener); @NonNull @Override String toString(); }
AdRequest { @VisibleForTesting void extractTrackUrls(@Nullable Response.Seatbid.Bid bid) { if (bid == null) { return; } trackUrls = new EnumMap<>(TrackEventType.class); OrtbUtils.addEvent(trackUrls, TrackEventType.MediationWin, bid.getPurl()); OrtbUtils.addEvent(trackUrls, TrackEventType.MediationLoss, bid.getLurl()); } protected  AdRequest(@NonNull AdsType adsType); @Nullable @SuppressWarnings("WeakerAccess") AuctionResult getAuctionResult(); void request(@NonNull final android.content.Context context); void notifyMediationWin(); void notifyMediationLoss(); @SuppressWarnings("WeakerAccess") boolean isExpired(); @SuppressWarnings("WeakerAccess") void addListener(@Nullable AdRequestListener<SelfType> listener); @SuppressWarnings("WeakerAccess") void removeListener(@Nullable AdRequestListener<SelfType> listener); @NonNull @Override String toString();  }