use of org.apache.cxf.jaxrs.model.MethodInvocationInfo in project cxf by apache.
the class UriInfoImplTest method testGetMatchedURIsRoot.
@Test
public void testGetMatchedURIsRoot() throws Exception {
System.out.println("testGetMatchedURIsRoot");
Message m = mockMessage("http://localhost:8080/app", "/foo");
OperationResourceInfoStack oriStack = new OperationResourceInfoStack();
ClassResourceInfo cri = getCri(RootResource.class, true);
OperationResourceInfo ori = getOri(cri, "get");
MethodInvocationInfo miInfo = new MethodInvocationInfo(ori, RootResource.class, new ArrayList<String>());
oriStack.push(miInfo);
m.put(OperationResourceInfoStack.class, oriStack);
UriInfoImpl u = new UriInfoImpl(m);
List<String> matchedUris = getMatchedURIs(u);
assertEquals(1, matchedUris.size());
assertTrue(matchedUris.contains("foo"));
}
Aggregations