Carolyn Biggar
01/08/2019, 3:47 PMRxHttpClient client
cannot be injected.
Our test looks like this:
@MicronautTest
class SampleControllerTest {
@Inject
@Client( "/")
lateinit var client: RxHttpClient
@Test
fun `should return hello world`() {
val response: String = client.toBlocking().retrieve("/test/hello")
assertTrue(response.equals("Hello World"))
}
}
Our code is https://github.com/stottpaul/micronaut-testcase - to recreate the problem, clone the repo and either run ./gradlew build
or just run SampleControllerTest
from IntelliJ IDEA
The stack trace is below - can anyone help us?