mirror of
https://github.com/lightbend/config.git
synced 2025-01-15 23:01:05 +08:00
Add a test that we can get values from an unresolved config
This commit is contained in:
parent
48fe0e9712
commit
a48edce4b4
@ -908,4 +908,13 @@ class PublicApiTest extends TestUtils {
|
||||
assertTrue("stuff gets cached repeatedly sys", sys3 eq sys4)
|
||||
assertTrue("stuff gets cached repeatedly conf", conf3 eq conf4)
|
||||
}
|
||||
|
||||
@Test
|
||||
def canUseSomeValuesWithoutResolving(): Unit = {
|
||||
val conf = ConfigFactory.parseString("a=42,b=${NOPE}")
|
||||
assertEquals(42, conf.getInt("a"))
|
||||
intercept[ConfigException.NotResolved] {
|
||||
conf.getInt("b")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user