Methods Summary |
---|
public void | beginOneHitRequest(org.apache.cactus.WebRequest request)
request.addParameter("query", "January");
|
public void | beginThreeHitRequest(org.apache.cactus.WebRequest request)
request.addParameter("query", "spider");
|
private com.develop.ss.search.QueryBean | callServlet()
searchServlet.doGet(request, response);
QueryBean bean = (QueryBean) request.getAttribute("luceneQueryBean");
assertNotNull(bean);
return bean;
|
public void | endEmptyRequest(com.meterware.httpunit.WebResponse response)This test duplicates functionality that already exists in the
HTTPUnit tests and is just here as a demonstration of client-side
result validation in Cactus.
WebLink[] links = response.getLinks();
assertEquals(0, links.length);
|
public void | setUp()
searchServlet = new SiteSearch();
searchServlet.init(config);
|
public void | testEmptyRequest()
QueryBean bean = callServlet();
assertEquals(0, bean.getResults().length);
|
public void | testOneHitRequest()
QueryBean bean = callServlet();
assertEquals(1, bean.getResults().length);
|
public void | testThreeHitRequest()
QueryBean bean = callServlet();
assertEquals(3, bean.getResults().length);
|