File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
src/test/java/com/google/firebase/remoteconfig Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,21 @@ public void testServerTemplateWithoutCacheValueThrowsException()
6363 assertEquals ("JSON String must not be null or empty." , error .getMessage ());
6464 }
6565
66+ @ Test
67+ public void testEvaluateWithoutContextReturnsDefaultValue ()
68+ throws FirebaseRemoteConfigException {
69+ KeysAndValues defaultConfig = new KeysAndValues .Builder ().build ();
70+ ServerTemplate template =
71+ new ServerTemplateImpl .Builder (null )
72+ .defaultConfig (defaultConfig )
73+ .cachedTemplate (cacheTemplate )
74+ .build ();
75+
76+ ServerConfig evaluatedConfig = template .evaluate ();
77+
78+ assertEquals ("Default value" , evaluatedConfig .getString ("Custom" ));
79+ }
80+
6681 @ Test
6782 public void testEvaluateCustomSignalReturnsDefaultValue () throws FirebaseRemoteConfigException {
6883 KeysAndValues defaultConfig = new KeysAndValues .Builder ().build ();
You can’t perform that action at this time.
0 commit comments