package com.iterable.iterableapi;

import org.json.JSONArray;
import org.json.JSONObject;

public class InAppTestUtils {
    public static IterableInAppMessage getTestInAppMessage() throws Exception {
        JSONObject payload = new JSONObject(IterableTestUtils.getResourceString("inapp_payload_single.json"));
        JSONArray jsonArray = payload.optJSONArray(IterableConstants.ITERABLE_IN_APP_MESSAGE);
        return IterableInAppMessage.fromJSONObject(jsonArray.getJSONObject(0), null);
    }
}

@@ -28,16 +28,47 @@
 leapi;%0A%0A
+import android.graphics.Rect;%0A%0A
 import o
@@ -86,16 +86,16 @@
 NArray;%0A
-
 import o
@@ -115,16 +115,40 @@
 bject;%0A%0A
+import java.util.Date;%0A%0A
 public c
@@ -455,16 +455,16 @@
 SSAGE);%0A
-
         
@@ -546,11 +546,802 @@
 );%0A    %7D
+%0A%0A    public static IterableInAppMessage getTestInboxInAppWithId(String messageId) %7B%0A        return new IterableInAppMessage(%0A                messageId,%0A                new IterableInAppMessage.Content(%22%22,%0A                        new Rect(0, 0, 0, 0),%0A                        0.0,%0A                        true,%0A                        new IterableInAppMessage.InAppDisplaySettings(true,%0A                                new IterableInAppMessage.InAppBgColor(%22000000%22, 0.0))),%0A                new JSONObject(),%0A                new Date(),%0A                new Date(),%0A                new IterableInAppMessage.Trigger(IterableInAppMessage.Trigger.TriggerType.IMMEDIATE),%0A                new Double(300.5),%0A                true,%0A                null,%0A                null%0A                );%0A    %7D
 %0A%7D%0A

create barebones in-app init