@Test public void requestNativeAd_shouldFireNetworkRequest() { subject.requestNativeAd("http: verify(mockNetworkListener, never()).onNativeFail(any(NativeErrorCode.class)); verify(mockRequestQueue).add(argThat(isUrl("http: }
void requestNativeAd(@Nullable final String endpointUrl) { final Context context = getContextOrDestroy(); if (context == null) { return; } if (endpointUrl == null) { mMoPubNativeNetworkListener.onNativeFail(INVALID_REQUEST_URL); return; } mNativeRequest = new AdRequest(endpointUrl, AdFormat.NATIVE, mAdUnitId, context, mVolleyListener); RequestQueue requestQueue = Networking.getRequestQueue(context); requestQueue.add(mNativeRequest); }
MoPubNative { void requestNativeAd(@Nullable final String endpointUrl) { final Context context = getContextOrDestroy(); if (context == null) { return; } if (endpointUrl == null) { mMoPubNativeNetworkListener.onNativeFail(INVALID_REQUEST_URL); return; } mNativeRequest = new AdRequest(endpointUrl, AdFormat.NATIVE, mAdUnitId, context, mVolleyListener); RequestQueue requestQueue = Networking.getRequestQueue(context); requestQueue.add(mNativeRequest); } }
MoPubNative { void requestNativeAd(@Nullable final String endpointUrl) { final Context context = getContextOrDestroy(); if (context == null) { return; } if (endpointUrl == null) { mMoPubNativeNetworkListener.onNativeFail(INVALID_REQUEST_URL); return; } mNativeRequest = new AdRequest(endpointUrl, AdFormat.NATIVE, mAdUnitId, context, mVolleyListener); RequestQueue requestQueue = Networking.getRequestQueue(context); requestQueue.add(mNativeRequest); } @Deprecated  MoPubNative(@NonNull final Context context,
            @NonNull final String adUnitId,
            @NonNull final MoPubNativeListener moPubNativeListener);  MoPubNative(@NonNull final Context context,
                @NonNull final String adUnitId,
                @NonNull final MoPubNativeNetworkListener moPubNativeNetworkListener); }
MoPubNative { void requestNativeAd(@Nullable final String endpointUrl) { final Context context = getContextOrDestroy(); if (context == null) { return; } if (endpointUrl == null) { mMoPubNativeNetworkListener.onNativeFail(INVALID_REQUEST_URL); return; } mNativeRequest = new AdRequest(endpointUrl, AdFormat.NATIVE, mAdUnitId, context, mVolleyListener); RequestQueue requestQueue = Networking.getRequestQueue(context); requestQueue.add(mNativeRequest); } @Deprecated  MoPubNative(@NonNull final Context context,
            @NonNull final String adUnitId,
            @NonNull final MoPubNativeListener moPubNativeListener);  MoPubNative(@NonNull final Context context,
                @NonNull final String adUnitId,
                @NonNull final MoPubNativeNetworkListener moPubNativeNetworkListener); void setNativeEventListener(@Nullable final MoPubNativeEventListener nativeEventListener); void destroy(); void setLocalExtras(@Nullable final Map<String, Object> localExtras); void makeRequest(); void makeRequest(@Nullable final RequestParameters requestParameters); void makeRequest(@Nullable final RequestParameters requestParameters,
            @Nullable Integer sequenceNumber); }
MoPubNative { void requestNativeAd(@Nullable final String endpointUrl) { final Context context = getContextOrDestroy(); if (context == null) { return; } if (endpointUrl == null) { mMoPubNativeNetworkListener.onNativeFail(INVALID_REQUEST_URL); return; } mNativeRequest = new AdRequest(endpointUrl, AdFormat.NATIVE, mAdUnitId, context, mVolleyListener); RequestQueue requestQueue = Networking.getRequestQueue(context); requestQueue.add(mNativeRequest); } @Deprecated  MoPubNative(@NonNull final Context context,
            @NonNull final String adUnitId,
            @NonNull final MoPubNativeListener moPubNativeListener);  MoPubNative(@NonNull final Context context,
                @NonNull final String adUnitId,
                @NonNull final MoPubNativeNetworkListener moPubNativeNetworkListener); void setNativeEventListener(@Nullable final MoPubNativeEventListener nativeEventListener); void destroy(); void setLocalExtras(@Nullable final Map<String, Object> localExtras); void makeRequest(); void makeRequest(@Nullable final RequestParameters requestParameters); void makeRequest(@Nullable final RequestParameters requestParameters,
            @Nullable Integer sequenceNumber);  }