use of org.edx.mobile.util.Config in project edx-app-android by edx.
the class ConfigTests method testFacebookConfig.
@Test
public void testFacebookConfig() {
String appId = "fake-app-id";
JsonObject fbConfig = new JsonObject();
fbConfig.add(ENABLED, new JsonPrimitive(true));
fbConfig.add(FACEBOOK_APP_ID, new JsonPrimitive(appId));
JsonObject configBase = new JsonObject();
configBase.add(FACEBOOK, fbConfig);
Config config = new Config(configBase);
assertTrue(config.getFacebookConfig().isEnabled());
assertEquals(appId, config.getFacebookConfig().getFacebookAppId());
}
use of org.edx.mobile.util.Config in project edx-app-android by edx.
the class ConfigTests method testFabricNoConfig.
@Test
public void testFabricNoConfig() {
JsonObject configBase = new JsonObject();
Config config = new Config(configBase);
assertFalse(config.getFabricConfig().isEnabled());
assertNull(config.getFabricConfig().getFabricKey());
assertNull(config.getFabricConfig().getFabricBuildSecret());
}
use of org.edx.mobile.util.Config in project edx-app-android by edx.
the class ConfigTests method testNewRelicConfig.
@Test
public void testNewRelicConfig() {
String key = "fake-key";
JsonObject newRelicConfig = new JsonObject();
newRelicConfig.add(ENABLED, new JsonPrimitive(true));
newRelicConfig.add(NEW_RELIC_KEY, new JsonPrimitive(key));
JsonObject configBase = new JsonObject();
configBase.add(NEW_RELIC, newRelicConfig);
Config config = new Config(configBase);
assertTrue(config.getNewRelicConfig().isEnabled());
assertEquals(key, config.getNewRelicConfig().getNewRelicKey());
}
use of org.edx.mobile.util.Config in project edx-app-android by edx.
the class ConfigTests method testFabricEmptyConfig.
@Test
public void testFabricEmptyConfig() {
JsonObject fabricConfig = new JsonObject();
JsonObject configBase = new JsonObject();
configBase.add(FABRIC, fabricConfig);
Config config = new Config(configBase);
assertFalse(config.getFabricConfig().isEnabled());
assertNull(config.getFabricConfig().getFabricKey());
assertNull(config.getFabricConfig().getFabricBuildSecret());
}
use of org.edx.mobile.util.Config in project edx-app-android by edx.
the class ConfigTests method testNewRelicNoConfig.
@Test
public void testNewRelicNoConfig() {
JsonObject configBase = new JsonObject();
Config config = new Config(configBase);
assertFalse(config.getNewRelicConfig().isEnabled());
assertNull(config.getNewRelicConfig().getNewRelicKey());
}
Aggregations