@Test public void getAll_noActivatedConfigsButDefaultsKeysExist_returnsDefaultsValuess() throws Exception { loadCacheWithConfig(mockActivatedCache, null); loadDefaultsCacheWithMap(ImmutableMap.of("pre11", "default_foo", "pre21", "default_bar")); Map<String, FirebaseRemoteConfigValue> configs = getHandler.getAll(); assertThat(configs.keySet()).isEqualTo(ImmutableSet.of("pre11", "pre21")); assertThat(configs.get("pre11").asString()).isEqualTo("default_foo"); assertThat(configs.get("pre21").asString()).isEqualTo("default_bar"); }
public Map<String, FirebaseRemoteConfigValue> getAll() { Set<String> keySet = new HashSet<>(); keySet.addAll(getKeySetFromCache(activatedConfigsCache)); keySet.addAll(getKeySetFromCache(defaultConfigsCache)); HashMap<String, FirebaseRemoteConfigValue> allConfigs = new HashMap<>(); for (String key : keySet) { allConfigs.put(key, getValue(key)); } return allConfigs; }
ConfigGetParameterHandler { public Map<String, FirebaseRemoteConfigValue> getAll() { Set<String> keySet = new HashSet<>(); keySet.addAll(getKeySetFromCache(activatedConfigsCache)); keySet.addAll(getKeySetFromCache(defaultConfigsCache)); HashMap<String, FirebaseRemoteConfigValue> allConfigs = new HashMap<>(); for (String key : keySet) { allConfigs.put(key, getValue(key)); } return allConfigs; } }
ConfigGetParameterHandler { public Map<String, FirebaseRemoteConfigValue> getAll() { Set<String> keySet = new HashSet<>(); keySet.addAll(getKeySetFromCache(activatedConfigsCache)); keySet.addAll(getKeySetFromCache(defaultConfigsCache)); HashMap<String, FirebaseRemoteConfigValue> allConfigs = new HashMap<>(); for (String key : keySet) { allConfigs.put(key, getValue(key)); } return allConfigs; } ConfigGetParameterHandler(
      ConfigCacheClient activatedConfigsCache, ConfigCacheClient defaultConfigsCache); }
ConfigGetParameterHandler { public Map<String, FirebaseRemoteConfigValue> getAll() { Set<String> keySet = new HashSet<>(); keySet.addAll(getKeySetFromCache(activatedConfigsCache)); keySet.addAll(getKeySetFromCache(defaultConfigsCache)); HashMap<String, FirebaseRemoteConfigValue> allConfigs = new HashMap<>(); for (String key : keySet) { allConfigs.put(key, getValue(key)); } return allConfigs; } 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 Map<String, FirebaseRemoteConfigValue> getAll() { Set<String> keySet = new HashSet<>(); keySet.addAll(getKeySetFromCache(activatedConfigsCache)); keySet.addAll(getKeySetFromCache(defaultConfigsCache)); HashMap<String, FirebaseRemoteConfigValue> allConfigs = new HashMap<>(); for (String key : keySet) { allConfigs.put(key, getValue(key)); } return allConfigs; } 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; }