mirror of
https://github.com/lightbend/config.git
synced 2025-01-15 23:01:05 +08:00
add a few more test assertions for withFallback
This commit is contained in:
parent
4f623d9dd5
commit
c16b305c0d
@ -482,6 +482,12 @@ class ConfigTest extends TestUtils {
|
||||
assertTrue(nonEmpty ne nonEmptyIgnoringFallbacks)
|
||||
assertTrue(empty ne emptyIgnoringFallbacks)
|
||||
|
||||
// falling back from one object to another should not make us ignore fallbacks
|
||||
assertEquals(false, ignoresFallbacks(nonEmpty.withFallback(empty)))
|
||||
assertEquals(false, ignoresFallbacks(empty.withFallback(nonEmpty)))
|
||||
assertEquals(false, ignoresFallbacks(empty.withFallback(empty)))
|
||||
assertEquals(false, ignoresFallbacks(nonEmpty.withFallback(nonEmpty)))
|
||||
|
||||
// falling back from primitive just returns this
|
||||
assertTrue(primitive eq primitive.withFallback(empty))
|
||||
assertTrue(primitive eq primitive.withFallback(nonEmpty))
|
||||
|
Loading…
Reference in New Issue
Block a user