@Test public void setParamsTest() { new CustomObject(tracker).setValue("{\"obj\":{\"key\":\"value\"}}").setParams(); new CustomObject(tracker).setValue("{\"key\":\"value\"}").setParams(); new CustomObject(tracker).setValue("{\"key1\":\"value1\"}").setParams(); assertEquals(1, buffer.getVolatileParams().size()); assertEquals(0, buffer.getPersistentParams().size()); assertEquals(3, buffer.getVolatileParams().get("stc").getValues().size()); assertEquals("{\"obj\":{\"key\":\"value\"}}", buffer.getVolatileParams().get("stc").getValues().get(0).execute()); assertEquals("{\"key\":\"value\"}", buffer.getVolatileParams().get("stc").getValues().get(1).execute()); assertEquals("{\"key1\":\"value1\"}", buffer.getVolatileParams().get("stc").getValues().get(2).execute()); }
@Override void setParams() { tracker.setParam(Hit.HitParam.JSON.stringValue(), value, new ParamOption().setAppend(true).setEncode(true).setPersistent(isPersistent).setType(ParamOption.Type.JSON)); }
CustomObject extends BusinessObject { @Override void setParams() { tracker.setParam(Hit.HitParam.JSON.stringValue(), value, new ParamOption().setAppend(true).setEncode(true).setPersistent(isPersistent).setType(ParamOption.Type.JSON)); } }
CustomObject extends BusinessObject { @Override void setParams() { tracker.setParam(Hit.HitParam.JSON.stringValue(), value, new ParamOption().setAppend(true).setEncode(true).setPersistent(isPersistent).setType(ParamOption.Type.JSON)); } CustomObject(String customObjectString);   CustomObject(Map<String, Object> customObject);   CustomObject(Tracker tracker); }
CustomObject extends BusinessObject { @Override void setParams() { tracker.setParam(Hit.HitParam.JSON.stringValue(), value, new ParamOption().setAppend(true).setEncode(true).setPersistent(isPersistent).setType(ParamOption.Type.JSON)); } CustomObject(String customObjectString);   CustomObject(Map<String, Object> customObject);   CustomObject(Tracker tracker); CustomObject setPersistent(boolean persistent); String getValue(); }
CustomObject extends BusinessObject { @Override void setParams() { tracker.setParam(Hit.HitParam.JSON.stringValue(), value, new ParamOption().setAppend(true).setEncode(true).setPersistent(isPersistent).setType(ParamOption.Type.JSON)); } CustomObject(String customObjectString);   CustomObject(Map<String, Object> customObject);   CustomObject(Tracker tracker); CustomObject setPersistent(boolean persistent); String getValue();  }