use of org.apache.cxf.systest.jaxrs.BookStore.BookInfo in project cxf by apache.
the class JAXRSClientServerBookTest method testGetBookAdapterInfoProxy.
@Test
public void testGetBookAdapterInfoProxy() throws Exception {
BookStore store = JAXRSClientFactory.create("http://localhost:" + PORT, BookStore.class);
BookInfo info = store.getBookAdapter();
assertEquals(123L, info.getId());
}
use of org.apache.cxf.systest.jaxrs.BookStore.BookInfo in project cxf by apache.
the class JAXRS20ClientServerBookTest method testGetBookWebTargetInjectableProvider.
@Test
public void testGetBookWebTargetInjectableProvider() {
String address = "http://localhost:" + PORT + "/bookstore/bookheaders";
Client client = ClientBuilder.newClient();
client.register(new BookInfoInjectableReader());
BookInfo book = client.target(address).path("simple").request("application/xml").get(BookInfo.class);
assertEquals(124L, book.getId());
}
use of org.apache.cxf.systest.jaxrs.BookStore.BookInfo in project cxf by apache.
the class JAXRS20ClientServerBookTest method testGetBookSpecProviderWithFeature.
@Test
public void testGetBookSpecProviderWithFeature() {
String address = "http://localhost:" + PORT + "/bookstore/bookheaders/simple";
Client client = ClientBuilder.newClient();
client.register(new ClientTestFeature());
WebTarget target = client.target(address);
BookInfo book = target.request("application/xml").get(BookInfo.class);
assertEquals(124L, book.getId());
book = target.request("application/xml").get(BookInfo.class);
assertEquals(124L, book.getId());
}
use of org.apache.cxf.systest.jaxrs.BookStore.BookInfo in project cxf by apache.
the class JAXRS20ClientServerBookTest method testGetBookSpecProvider.
@Test
public void testGetBookSpecProvider() {
String address = "http://localhost:" + PORT + "/bookstore/bookheaders/simple";
Client client = ClientBuilder.newClient();
client.register(new BookInfoReader());
WebTarget target = client.target(address);
BookInfo book = target.request("application/xml").get(BookInfo.class);
assertEquals(124L, book.getId());
book = target.request("application/xml").get(BookInfo.class);
assertEquals(124L, book.getId());
}
use of org.apache.cxf.systest.jaxrs.BookStore.BookInfo in project cxf by apache.
the class JAXRS20ClientServerBookTest method testGetBookWebTargetProvider.
@Test
public void testGetBookWebTargetProvider() {
String address = "http://localhost:" + PORT + "/bookstore/bookheaders";
Client client = ClientBuilder.newClient();
client.register(new BookInfoReader());
BookInfo book = client.target(address).path("simple").request("application/xml").get(BookInfo.class);
assertEquals(124L, book.getId());
}