use of feign.ChildPojo in project feign by OpenFeign.
the class Http2ClientAsyncTest method queryMap_with_child_pojo.
@Test
public void queryMap_with_child_pojo() throws Exception {
final TestInterfaceAsync api = newAsyncBuilder().queryMapEndcoder(new FieldQueryMapEncoder()).target("http://localhost:" + server.getPort());
final ChildPojo childPojo = new ChildPojo();
childPojo.setChildPrivateProperty("first");
childPojo.setParentProtectedProperty("second");
childPojo.setParentPublicProperty("third");
server.enqueue(new MockResponse());
final CompletableFuture<?> cf = api.queryMapPropertyInheritence(childPojo);
assertThat(server.takeRequest()).hasQueryParams("parentPublicProperty=third", "parentProtectedProperty=second", "childPrivateProperty=first");
checkCFCompletedSoon(cf);
}
Aggregations