use of com.meterware.httpunit.WebConversation in project cxf by apache.
the class NoSpringServletClientTest method testGetServiceList.
@Test
public void testGetServiceList() throws Exception {
WebConversation client = new WebConversation();
WebResponse res = client.getResponse(serviceURL + "/services");
WebLink[] links = res.getLinks();
Set<String> s = new HashSet<>();
for (WebLink l : links) {
s.add(l.getURLString());
}
assertEquals("There should be 3 links for the service", 3, links.length);
assertTrue(s.contains(serviceURL + "Greeter?wsdl"));
assertTrue(s.contains(serviceURL + "Hello?wsdl"));
assertTrue(s.contains(serviceURL + "?wsdl"));
assertEquals("text/html", res.getContentType());
}
Aggregations