Hi,

I am working on a API to expose service using CXF. The strange problem
facing here is, when we deploy as a web-app the UriInfo getting injected and
everything is working fine.

When we run the Junit test cases, UriBuilder throws NullPointerException as
the UriInfo holds null. It happens only when we keep the @Context UriInfo in
an abstract class field or a bean property.

The unit test cases work fine when the UriInfo is been given as a method
param to the APIs we expose.

In Junit test case, we are instantiating JAXRSServerFactoryBean and adding
the resource provider as the service interface. Please help getting through
this issue.

Thanks,
SK
-- 
View this message in context: 
http://old.nabble.com/Unable-to-inject-%40context-from-junit-test-case-tp28899148p28899148.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to