@Override public void read(JSONObject object) throws JSONException { super.read(object); setProperties(readProperties(object)); }
@Override public void write(JSONStringer writer) throws JSONException { super.write(writer); writeProperties(writer, getProperties()); }
@Override public void read(JSONObject object) throws JSONException { super.read(object); setServices(JSONUtils.readStringArray(object, SERVICES)); }
@Override public void write(JSONStringer writer) throws JSONException { JSONUtils.write(writer, WRAPPER_SDK_VERSION, getWrapperSdkVersion()); JSONUtils.write(writer, WRAPPER_SDK_NAME, getWrapperSdkName()); JSONUtils.write(writer, WRAPPER_RUNTIME_VERSION, getWrapperRuntimeVersion()); JSONUtils.write(writer, LIVE_UPDATE_RELEASE_LABEL, getLiveUpdateReleaseLabel()); JSONUtils.write(writer, LIVE_UPDATE_DEPLOYMENT_KEY, getLiveUpdateDeploymentKey()); JSONUtils.write(writer, LIVE_UPDATE_PACKAGE_HASH, getLiveUpdatePackageHash()); }
@Override public void read(JSONObject object) throws JSONException { setWrapperSdkVersion(object.optString(WRAPPER_SDK_VERSION, null)); setWrapperSdkName(object.optString(WRAPPER_SDK_NAME, null)); setWrapperRuntimeVersion(object.optString(WRAPPER_RUNTIME_VERSION, null)); setLiveUpdateReleaseLabel(object.optString(LIVE_UPDATE_RELEASE_LABEL, null)); setLiveUpdateDeploymentKey(object.optString(LIVE_UPDATE_DEPLOYMENT_KEY, null)); setLiveUpdatePackageHash(object.optString(LIVE_UPDATE_PACKAGE_HASH, null)); }
@Override public void read(JSONObject object) throws JSONException { super.read(object); setProperties(JSONUtils.readMap(object, PROPERTIES)); }
@Override public void write(JSONStringer writer) throws JSONException { super.write(writer); JSONUtils.writeStringArray(writer, SERVICES, getServices()); }
@Override public void write(JSONStringer writer) throws JSONException { super.write(writer); JSONUtils.writeMap(writer, PROPERTIES, getProperties()); }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (services != null ? services.hashCode() : 0); return result; } }
@Test public void compareDifferentType() { compareSelfNullClass(new Device()); compareSelfNullClass(new WrapperSdk()); }
@Override public Log create() { return new StartServiceLog(); } }
@Test public void compareDifferentType() { TestUtils.compareSelfNullClass(new MockLog()); MockLogWithProperties mockLogWithProperties = new MockLogWithProperties(); TestUtils.compareSelfNullClass(mockLogWithProperties); mockLogWithProperties.setTimestamp(new Date(1L)); checkNotEquals(mockLogWithProperties, new MockLogWithProperties()); }
@Override public Log create() { return new CustomPropertiesLog(); } }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (name != null ? name.hashCode() : 0); return result; } }
@Override synchronized public void onPreparingLog(@NonNull Log log, @NonNull String groupName) { if (mDistributionGroupId == null) { return; } /* Set current distribution group ID. */ log.setDistributionGroupId(mDistributionGroupId); }
@Test public void utilsCoverage() { new CommonProperties(); }
public static void writeArray(JSONStringer writer, String key, List<? extends Model> value) throws JSONException { if (value != null) { writer.key(key).array(); for (Model model : value) { writer.object(); model.write(writer); writer.endObject(); } writer.endArray(); } }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (properties != null ? properties.hashCode() : 0); return result; } }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (properties != null ? properties.hashCode() : 0); return result; } }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (pushToken != null ? pushToken.hashCode() : 0); return result; } }