@Test public void testReplacedResolutionEvent() throws JSONException { ResolutionEvent event = ResolutionEvent.legacyMessageReplaced("iam id", "replacement id"); JsonMap expectedResolutionInfo = JsonMap.newBuilder() .put("type", "replaced") .put("replacement_id", "replacement id") .build(); verifyEvent(expectedResolutionInfo, event); }
static ResolutionEvent legacyMessageReplaced(@NonNull String scheduleId, @NonNull String newId) { JsonMap resolutionData = JsonMap.newBuilder() .put(RESOLUTION_TYPE, LEGACY_MESSAGE_REPLACED) .put(REPLACEMENT_ID, newId) .build(); return new ResolutionEvent(JsonValue.wrap(scheduleId), InAppMessage.SOURCE_LEGACY_PUSH, resolutionData); }
ResolutionEvent extends InAppMessageEvent { static ResolutionEvent legacyMessageReplaced(@NonNull String scheduleId, @NonNull String newId) { JsonMap resolutionData = JsonMap.newBuilder() .put(RESOLUTION_TYPE, LEGACY_MESSAGE_REPLACED) .put(REPLACEMENT_ID, newId) .build(); return new ResolutionEvent(JsonValue.wrap(scheduleId), InAppMessage.SOURCE_LEGACY_PUSH, resolutionData); } }
ResolutionEvent extends InAppMessageEvent { static ResolutionEvent legacyMessageReplaced(@NonNull String scheduleId, @NonNull String newId) { JsonMap resolutionData = JsonMap.newBuilder() .put(RESOLUTION_TYPE, LEGACY_MESSAGE_REPLACED) .put(REPLACEMENT_ID, newId) .build(); return new ResolutionEvent(JsonValue.wrap(scheduleId), InAppMessage.SOURCE_LEGACY_PUSH, resolutionData); } ResolutionEvent(@NonNull String scheduleId, @NonNull InAppMessage message, @NonNull JsonMap resolutionData);   ResolutionEvent(@NonNull JsonValue eventId, @NonNull String source, @NonNull JsonMap resolutionData); }
ResolutionEvent extends InAppMessageEvent { static ResolutionEvent legacyMessageReplaced(@NonNull String scheduleId, @NonNull String newId) { JsonMap resolutionData = JsonMap.newBuilder() .put(RESOLUTION_TYPE, LEGACY_MESSAGE_REPLACED) .put(REPLACEMENT_ID, newId) .build(); return new ResolutionEvent(JsonValue.wrap(scheduleId), InAppMessage.SOURCE_LEGACY_PUSH, resolutionData); } ResolutionEvent(@NonNull String scheduleId, @NonNull InAppMessage message, @NonNull JsonMap resolutionData);   ResolutionEvent(@NonNull JsonValue eventId, @NonNull String source, @NonNull JsonMap resolutionData); @NonNull @Override final String getType(); @NonNull @Override @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) JsonMap getEventData(); }
ResolutionEvent extends InAppMessageEvent { static ResolutionEvent legacyMessageReplaced(@NonNull String scheduleId, @NonNull String newId) { JsonMap resolutionData = JsonMap.newBuilder() .put(RESOLUTION_TYPE, LEGACY_MESSAGE_REPLACED) .put(REPLACEMENT_ID, newId) .build(); return new ResolutionEvent(JsonValue.wrap(scheduleId), InAppMessage.SOURCE_LEGACY_PUSH, resolutionData); } ResolutionEvent(@NonNull String scheduleId, @NonNull InAppMessage message, @NonNull JsonMap resolutionData);   ResolutionEvent(@NonNull JsonValue eventId, @NonNull String source, @NonNull JsonMap resolutionData); @NonNull @Override final String getType(); @NonNull @Override @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) JsonMap getEventData();  }