Search in sources :

Example 11 with AdRequestInput

use of org.prebid.mobile.rendering.networking.parameters.AdRequestInput in project prebid-mobile-android by prebid.

the class URLBuilderTest method testBuildParametersNull.

@Test
public void testBuildParametersNull() throws Exception {
    AdRequestInput adRequestInput = URLBuilder.buildParameters(null, null);
    assertEquals("{}", adRequestInput.getBidRequest().getJsonObject().toString());
}
Also used : AdRequestInput(org.prebid.mobile.rendering.networking.parameters.AdRequestInput) Test(org.junit.Test)

Example 12 with AdRequestInput

use of org.prebid.mobile.rendering.networking.parameters.AdRequestInput in project prebid-mobile-android by prebid.

the class URLComponentsTest method testFullURL.

@Test
public void testFullURL() throws Exception {
    AdRequestInput adRequestInput = new AdRequestInput();
    adRequestInput.getBidRequest().getApp().name = "app";
    URLComponents urlComponents = new URLComponents("www.domain.com", adRequestInput);
    assertEquals("www.domain.com?openrtb=%7B%22app%22%3A%7B%22name%22%3A%22app%22%7D%7D", urlComponents.getFullUrl());
}
Also used : AdRequestInput(org.prebid.mobile.rendering.networking.parameters.AdRequestInput) Test(org.junit.Test)

Example 13 with AdRequestInput

use of org.prebid.mobile.rendering.networking.parameters.AdRequestInput in project prebid-mobile-android by prebid.

the class BidLoader method sendBidRequest.

private void sendBidRequest(Context context, AdConfiguration config) {
    mCurrentlyLoading.set(true);
    if (mBidRequester == null) {
        mBidRequester = new BidRequester(context, config, new AdRequestInput(), mResponseHandler);
    }
    mBidRequester.startAdRequest();
}
Also used : AdRequestInput(org.prebid.mobile.rendering.networking.parameters.AdRequestInput) BidRequester(org.prebid.mobile.rendering.networking.modelcontrollers.BidRequester)

Example 14 with AdRequestInput

use of org.prebid.mobile.rendering.networking.parameters.AdRequestInput in project prebid-mobile-android by prebid.

the class URLBuilder method buildUrl.

public BidUrlComponents buildUrl() {
    AdRequestInput adRequestInput = buildParameters(mParamBuilders, mAdRequestInput);
    String initialPath = mPathBuilder.buildURLPath("");
    return new BidUrlComponents(initialPath, adRequestInput);
}
Also used : AdRequestInput(org.prebid.mobile.rendering.networking.parameters.AdRequestInput)

Aggregations

AdRequestInput (org.prebid.mobile.rendering.networking.parameters.AdRequestInput)14 Test (org.junit.Test)10 BidRequest (org.prebid.mobile.rendering.models.openrtb.BidRequest)8 AdConfiguration (org.prebid.mobile.rendering.models.AdConfiguration)3 Activity (android.app.Activity)2 Before (org.junit.Before)2 Location (android.location.Location)1 LocationManager (android.location.LocationManager)1 ArrayList (java.util.ArrayList)1 JSONException (org.json.JSONException)1 JSONObject (org.json.JSONObject)1 Device (org.prebid.mobile.rendering.models.openrtb.bidRequests.Device)1 BidRequester (org.prebid.mobile.rendering.networking.modelcontrollers.BidRequester)1 AppInfoParameterBuilder (org.prebid.mobile.rendering.networking.parameters.AppInfoParameterBuilder)1 DeviceInfoParameterBuilder (org.prebid.mobile.rendering.networking.parameters.DeviceInfoParameterBuilder)1 GeoLocationParameterBuilder (org.prebid.mobile.rendering.networking.parameters.GeoLocationParameterBuilder)1 NetworkParameterBuilder (org.prebid.mobile.rendering.networking.parameters.NetworkParameterBuilder)1 ParameterBuilder (org.prebid.mobile.rendering.networking.parameters.ParameterBuilder)1 ShadowActivity (org.robolectric.shadows.ShadowActivity)1 ShadowLocationManager (org.robolectric.shadows.ShadowLocationManager)1