Search in sources :

Example 1 with Pmp

use of org.prebid.mobile.rendering.models.openrtb.bidRequests.imps.Pmp in project prebid-mobile-android by prebid.

the class ImpTest method getJsonObject.

@Test
public void getJsonObject() throws Exception {
    Imp imp = new Imp();
    imp.displaymanager = "prebid";
    imp.displaymanagerver = "1.0";
    imp.instl = 1;
    imp.tagid = "tagid";
    imp.secure = 0;
    imp.banner = new Banner();
    imp.video = new Video();
    imp.pmp = new Pmp();
    imp.clickBrowser = 0;
    JSONObject actualObj = imp.getJsonObject();
    String expectedString = "{\"clickbrowser\":0,\"pmp\":{},\"tagid\":\"tagid\",\"displaymanager\":\"prebid\",\"displaymanagerver\":\"1.0\",\"banner\":{},\"video\":{},\"secure\":0,\"instl\":1}";
    assertEquals("got: " + actualObj.toString(), expectedString, actualObj.toString());
    imp.getJsonObject();
}
Also used : Pmp(org.prebid.mobile.rendering.models.openrtb.bidRequests.imps.Pmp) JSONObject(org.json.JSONObject) Banner(org.prebid.mobile.rendering.models.openrtb.bidRequests.imps.Banner) Video(org.prebid.mobile.rendering.models.openrtb.bidRequests.imps.Video) Test(org.junit.Test)

Aggregations

JSONObject (org.json.JSONObject)1 Test (org.junit.Test)1 Banner (org.prebid.mobile.rendering.models.openrtb.bidRequests.imps.Banner)1 Pmp (org.prebid.mobile.rendering.models.openrtb.bidRequests.imps.Pmp)1 Video (org.prebid.mobile.rendering.models.openrtb.bidRequests.imps.Video)1