I have a ktor question if anyone is willing to hel...
# server
k
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()
essentially i just want to set the property in my unit test
oops i see im in the wrong room
b
#ktor
2
d
@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.