Search in sources :

Example 6 with Geo

use of org.prebid.mobile.rendering.models.openrtb.bidRequests.devices.Geo in project prebid-mobile-android by prebid.

the class UserTest method getJsonObject.

@Test
public void getJsonObject() throws Exception {
    User user = new User();
    user.yob = 2016;
    user.gender = "M";
    user.geo = new Geo();
    user.geo.accuracy = 1;
    user.keywords = "q, a";
    JSONObject actualObj = user.getJsonObject();
    String expectedString = "{\"geo\":{\"accuracy\":1},\"gender\":\"M\",\"keywords\":\"q, a\",\"yob\":2016}";
    assertEquals("got: " + actualObj.toString(), expectedString, actualObj.toString());
    user.getJsonObject();
}
Also used : Geo(org.prebid.mobile.rendering.models.openrtb.bidRequests.devices.Geo) JSONObject(org.json.JSONObject) Test(org.junit.Test)

Aggregations

Geo (org.prebid.mobile.rendering.models.openrtb.bidRequests.devices.Geo)6 Test (org.junit.Test)4 JSONObject (org.json.JSONObject)2 User (org.prebid.mobile.rendering.models.openrtb.bidRequests.User)2 BidRequest (org.prebid.mobile.rendering.models.openrtb.BidRequest)1 Ext (org.prebid.mobile.rendering.models.openrtb.bidRequests.Ext)1