use of org.apache.cxf.jaxrs.resources.BookInterface in project cxf by apache.
the class JAXRSClientFactoryBeanTest method testInvokePathEmpty.
@Test(expected = IllegalArgumentException.class)
public void testInvokePathEmpty() throws Exception {
JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
bean.setAddress("http://bar");
bean.setResourceClass(BookInterface.class);
BookInterface store = bean.create(BookInterface.class);
store.getBook("");
}
use of org.apache.cxf.jaxrs.resources.BookInterface in project cxf by apache.
the class WebClientTest method testProxyConfiguration.
@Test
public void testProxyConfiguration() {
// interface
BookInterface proxy = JAXRSClientFactory.create("http://foo", BookInterface.class);
assertNotNull(WebClient.getConfig(proxy) != null);
// cglib
BookStore proxy2 = JAXRSClientFactory.create("http://foo", BookStore.class);
assertNotNull(WebClient.getConfig(proxy2) != null);
}
use of org.apache.cxf.jaxrs.resources.BookInterface in project cxf by apache.
the class WebClientTest method testProxyNull.
@Test(expected = IllegalArgumentException.class)
public void testProxyNull() {
// interface
BookInterface proxy = JAXRSClientFactory.create("http://foo", BookInterface.class);
proxy.getBook(null);
}
use of org.apache.cxf.jaxrs.resources.BookInterface in project cxf by apache.
the class JAXRSClientFactoryBeanTest method testInvokePathNull.
@Test(expected = IllegalArgumentException.class)
public void testInvokePathNull() throws Exception {
JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
bean.setAddress("http://bar");
bean.setResourceClass(BookInterface.class);
BookInterface store = bean.create(BookInterface.class);
store.getBook(null);
}
use of org.apache.cxf.jaxrs.resources.BookInterface in project cxf by apache.
the class JAXRSClientFactoryBeanTest method testInvokePathEmptyAllowed.
@Test
public void testInvokePathEmptyAllowed() throws Exception {
Bus bus = BusFactory.newInstance().createBus();
bus.setProperty("allow.empty.path.template.value", true);
JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
bean.setBus(bus);
bean.setAddress("http://bar");
bean.setResourceClass(BookInterface.class);
BookInterface store = bean.create(BookInterface.class);
assertNotNull(store.getBook(""));
}
Aggregations