use of com.google.firebase.crashlytics.internal.settings.model.SettingsData in project firebase-android-sdk by firebase.
the class SettingsJsonParserTest method testSettingsV2Parsing.
public void testSettingsV2Parsing() throws Exception {
final JSONObject testJson = getTestJSON("default_settings.json");
final SettingsData settingsData = settingsJsonParser.parseSettingsJson(testJson);
Assert.assertEquals("http://localhost:3000/spi/v1/platform/android/apps", settingsData.appData.url);
Assert.assertNull(settingsData.appData.organizationId);
Assert.assertNull(settingsData.appData.bundleId);
}
use of com.google.firebase.crashlytics.internal.settings.model.SettingsData in project firebase-android-sdk by firebase.
the class DefaultSettingsJsonTransformTest method testSettingsJsonTransformWithAnalyticsDefaults.
public void testSettingsJsonTransformWithAnalyticsDefaults() throws Exception {
final JSONObject testJson = getTestJSON("default_settings_omitted.json");
final SettingsData settingsData = transform.buildFromJson(mockCurrentTimeProvider, testJson);
verifySettingsDataObject(mockCurrentTimeProvider, settingsData);
}
use of com.google.firebase.crashlytics.internal.settings.model.SettingsData in project firebase-android-sdk by firebase.
the class DefaultSettingsJsonTransformTest method testNoIconJsonTransform.
public void testNoIconJsonTransform() throws Exception {
final JSONObject testJson = getTestJSON("no_icon_settings.json");
final SettingsData settingsData = transform.buildFromJson(mockCurrentTimeProvider, testJson);
assertEquals(3600010, settingsData.expiresAtMillis);
assertAppData(settingsData.appData);
assertSettingsData(settingsData.sessionData);
assertFeaturesData(settingsData.featuresData);
verify(mockCurrentTimeProvider).getCurrentTimeMillis();
}
use of com.google.firebase.crashlytics.internal.settings.model.SettingsData in project firebase-android-sdk by firebase.
the class DefaultSettingsJsonTransformTest method testSettingsJsonTransform.
public void testSettingsJsonTransform() throws Exception {
when(mockCurrentTimeProvider.getCurrentTimeMillis()).thenReturn(Long.valueOf(10));
final JSONObject testJson = getTestJSON("default_settings.json");
final SettingsData settingsData = transform.buildFromJson(mockCurrentTimeProvider, testJson);
verifySettingsDataObject(mockCurrentTimeProvider, settingsData);
}
use of com.google.firebase.crashlytics.internal.settings.model.SettingsData in project firebase-android-sdk by firebase.
the class DefaultSettingsJsonTransformTest method testSettingsJsonTransformWithAnalyticsSampling.
public void testSettingsJsonTransformWithAnalyticsSampling() throws Exception {
final JSONObject testJson = getTestJSON("settings_with_sampling.json");
final SettingsData settingsData = transform.buildFromJson(mockCurrentTimeProvider, testJson);
verifySettingsDataObject(mockCurrentTimeProvider, settingsData);
}
Aggregations