@Test public void getValue_activatedKeyExistsAndNoDefaultsConfigs_returnsActivatedValue() throws Exception { loadActivatedCacheWithMap(ImmutableMap.of(STRING_KEY, ACTIVATED_STRING_VALUE)); loadCacheWithConfig(mockDefaultsCache, null); FirebaseRemoteConfigValue frcValue = getHandler.getValue(STRING_KEY); assertThat(frcValue.asString()).isEqualTo(ACTIVATED_STRING_VALUE); }
public FirebaseRemoteConfigValue getValue(String key) { String activatedString = getStringFromCache(activatedConfigsCache, key); if (activatedString != null) { return new FirebaseRemoteConfigValueImpl(activatedString, VALUE_SOURCE_REMOTE); } String defaultsString = getStringFromCache(defaultConfigsCache, key); if (defaultsString != null) { return new FirebaseRemoteConfigValueImpl(defaultsString, VALUE_SOURCE_DEFAULT); } logParameterValueDoesNotExist(key, "FirebaseRemoteConfigValue"); return new FirebaseRemoteConfigValueImpl(DEFAULT_VALUE_FOR_STRING, VALUE_SOURCE_STATIC); }
ConfigGetParameterHandler { public FirebaseRemoteConfigValue getValue(String key) { String activatedString = getStringFromCache(activatedConfigsCache, key); if (activatedString != null) { return new FirebaseRemoteConfigValueImpl(activatedString, VALUE_SOURCE_REMOTE); } String defaultsString = getStringFromCache(defaultConfigsCache, key); if (defaultsString != null) { return new FirebaseRemoteConfigValueImpl(defaultsString, VALUE_SOURCE_DEFAULT); } logParameterValueDoesNotExist(key, "FirebaseRemoteConfigValue"); return new FirebaseRemoteConfigValueImpl(DEFAULT_VALUE_FOR_STRING, VALUE_SOURCE_STATIC); } }
ConfigGetParameterHandler { public FirebaseRemoteConfigValue getValue(String key) { String activatedString = getStringFromCache(activatedConfigsCache, key); if (activatedString != null) { return new FirebaseRemoteConfigValueImpl(activatedString, VALUE_SOURCE_REMOTE); } String defaultsString = getStringFromCache(defaultConfigsCache, key); if (defaultsString != null) { return new FirebaseRemoteConfigValueImpl(defaultsString, VALUE_SOURCE_DEFAULT); } logParameterValueDoesNotExist(key, "FirebaseRemoteConfigValue"); return new FirebaseRemoteConfigValueImpl(DEFAULT_VALUE_FOR_STRING, VALUE_SOURCE_STATIC); } ConfigGetParameterHandler(
      ConfigCacheClient activatedConfigsCache, ConfigCacheClient defaultConfigsCache); }
ConfigGetParameterHandler { public FirebaseRemoteConfigValue getValue(String key) { String activatedString = getStringFromCache(activatedConfigsCache, key); if (activatedString != null) { return new FirebaseRemoteConfigValueImpl(activatedString, VALUE_SOURCE_REMOTE); } String defaultsString = getStringFromCache(defaultConfigsCache, key); if (defaultsString != null) { return new FirebaseRemoteConfigValueImpl(defaultsString, VALUE_SOURCE_DEFAULT); } logParameterValueDoesNotExist(key, "FirebaseRemoteConfigValue"); return new FirebaseRemoteConfigValueImpl(DEFAULT_VALUE_FOR_STRING, VALUE_SOURCE_STATIC); } ConfigGetParameterHandler(
      ConfigCacheClient activatedConfigsCache, ConfigCacheClient defaultConfigsCache); String getString(String key); boolean getBoolean(String key); byte[] getByteArray(String key); double getDouble(String key); long getLong(String key); FirebaseRemoteConfigValue getValue(String key); Set<String> getKeysByPrefix(String prefix); Map<String, FirebaseRemoteConfigValue> getAll(); }
ConfigGetParameterHandler { public FirebaseRemoteConfigValue getValue(String key) { String activatedString = getStringFromCache(activatedConfigsCache, key); if (activatedString != null) { return new FirebaseRemoteConfigValueImpl(activatedString, VALUE_SOURCE_REMOTE); } String defaultsString = getStringFromCache(defaultConfigsCache, key); if (defaultsString != null) { return new FirebaseRemoteConfigValueImpl(defaultsString, VALUE_SOURCE_DEFAULT); } logParameterValueDoesNotExist(key, "FirebaseRemoteConfigValue"); return new FirebaseRemoteConfigValueImpl(DEFAULT_VALUE_FOR_STRING, VALUE_SOURCE_STATIC); } ConfigGetParameterHandler(
      ConfigCacheClient activatedConfigsCache, ConfigCacheClient defaultConfigsCache); String getString(String key); boolean getBoolean(String key); byte[] getByteArray(String key); double getDouble(String key); long getLong(String key); FirebaseRemoteConfigValue getValue(String key); Set<String> getKeysByPrefix(String prefix); Map<String, FirebaseRemoteConfigValue> getAll(); @VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE)
  static final Charset FRC_BYTE_ARRAY_ENCODING; }