I have a ktor question if anyone is willing to help. Having trouble using
withTestApplication
in my unit test because I am using a system property in my App like
val property = environment.config.property("randomproperty").getString()
kielpedia
01/21/2018, 1:53 AM
essentially i just want to set the property in my unit test
kielpedia
01/21/2018, 1:53 AM
oops i see im in the wrong room
b
bdawg.io
01/21/2018, 4:55 AM
#ktor
➕ 2
d
dave
01/21/2018, 9:45 AM
@kielpedia you might want to consider putting a layer of abstraction between your "launcher" and you actual application code. In that way, you can dependency inject the configuration into the application (either by a simple map/properties or DI container) and not have to rely on system properties in your tests.