Methods Summary |
---|
private ResponseType[] | doQuery(java.lang.String queryString)
return doQuery(queryString, 0.0f);
|
private ResponseType[] | doQuery(java.lang.String queryString, float threshold)
SiteSearchServiceLocator locator = new SiteSearchServiceLocator();
SiteSearch siteSearchSoap = locator.getSiteSearchSoap(new URL(config.getWebServiceEndpoint()));
QueryType query = new QueryType();
query.setSeachString(queryString);
query.setThreshold(threshold);
return siteSearchSoap.searchContents(query);
|
protected void | setUp()
super.setUp();
config = new ConfigBean();
|
public void | testEmptyResult()
ResponseType[] resp = doQuery("nada");
//bit surprised that this marshals to null instead of an empty array
assertNull(resp);
|
public void | testEndpointExists()
URL url = new URL(config.getWebServiceEndpoint());
Object o = url.getContent();
|
public void | testMultipleResults()
ResponseType[] resp = doQuery("spider");
assertNotNull(resp);
assertEquals("result is one because Axis marshalling broken, should be 3", 1, resp.length);
//TODO: Axis marshalling appears broken, the pipe is returning three but Axis only gets the first
//assertEquals(3, resp.length);
|
public void | testOneResult()
ResponseType[] resp = doQuery("one");
assertNotNull(resp);
assertEquals(1, resp.length);
|
public void | testThreshold()
ResponseType[] resp = doQuery("one", 1.0f);
assertNull("no result should have match threshold of 1.0", resp);
|
public void | testWSDLEndpointExists()
URL url = new URL(config.getWebServiceWsdl());
Object o = url.getContent();
|