trying to get a test application engine working wi...
# ktor
z
trying to get a test application engine working with HoconApplicationConfig. Here's what I'm trying:
Copy code
val env = applicationEngineEnvironment {
    config = HoconApplicationConfig(ConfigFactory.load())
}
withApplication(env) {
    // test code
}
This results in
java.lang.UnsupportedOperationException: Packages and file facades are not yet supported in Kotlin reflection. Meanwhile please use Java reflection to inspect this class: class com.zpearce.AppKt
What am I doing wrong? application.conf has the value "ktor.application.modules = [ com.zpearce.AppKt.main ]" in it, if that helps
If it still doesn’t work, make sure you have modules defined in your
.conf
file (debug with println it’s content to be sure)
z
Thank you, works great