We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@Inject HttpClientContext client
@InjectTest class HelloControllerTest { @Inject HttpClientContext client; @Test void hello() { HttpResponse<String> hello = client.request().path("hello") .GET() .asString(); assertThat(hello.statusCode()).isEqualTo(200); } }
HelloApi
@Client
@Get
@Post
import io.avaje.inject.test.InjectTest; import jakarta.inject.Inject; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; @InjectTest class HelloController2Test { @Inject static HelloApi client; @Test void hello() { String hi = client.hi(); assertThat(hi).isEqualTo("hisay+yo"); } @Test void hello2() { String hi = client.hi(); assertThat(hi).isEqualTo("hisay+yo"); } }
The text was updated successfully, but these errors were encountered:
#38 - Add support for component test with .. @Inject of Http client s…
25ba826
…tarts server, creates client (for injection)
b65d6eb
…tarts server, creates client (for injection) Examples using avaje-kate (a composite of jex + avaje-inject + avaje-http)
rbygrave
No branches or pull requests
Example,
@Inject HttpClientContext client
Example
HelloApi
is a java interface annotated with@Client
+@Get
,@Post
etc ...The text was updated successfully, but these errors were encountered: