yoavst
01/15/2016, 8:21 AMFuel
for network calls.
if I run the code under main (not test), it works as expected.
However, if I run it as @test
it doesn't work:
val api = ApiControllerImpl(RequestsControllerImpl(), DataParserImpl)
api.getSchools() success {
println("works")
it?.forEach { println(it) } ?: throw Exception("should not fail")
} fail {
it.printStackTrace()
throw Exception("should not fail")
}
to make it work as a test I need to run both Kovenant
and Fuel
in blocking mode.