Closed rocketraman closed 6 years ago
Is this a bug or just for more coverage?
I'm right now on a trip and I'll be back next week! I'll try to do it asap
Have in mind that there is a specific class for nesting even though I'm thinking in merging both.
Well... here is my situation. I tried to create a (hocon) config like this:
a.b.c = something
And then I tried to reference it in the code like this:
configProvider.bind<B>("a.b")
where B
looks like:
interface B {
fun c(): String
}
which didn't work. So I was looking for unit tests to see if this was a) a syntax error on my part, or b) something that isn't even supported. I didn't find any tests for this case.
FWIW, I do it this way in cfg4j.
I'll investigate
@rocketraman what provider are you using? If possible could you paste a snippet to reproduce?
in ProviderWithHocon.kt
i've added a loader and a proxy provider
val deployment = provider.bind<KtorDeploymentConfig>("ktor.deployment")
deployment.port.should.be.equal(8080)
And it works
@jdiazcano What do you know... I just tried it again and it worked perfectly. I'll close. Thanks!
I am still merging the changes for the tests.
The
ConfigProviderTest
has no test fornested.a
.