use of com.yahoo.search.rendering.DefaultRenderer in project vespa by vespa-engine.
the class SearchHandlerTestCase method testResponseBasics.
@Test
public void testResponseBasics() {
Query q = new Query("?query=dummy&tracelevel=3");
q.trace("nalle", 1);
Result r = new Result(q);
r.hits().addError(ErrorMessage.createUnspecifiedError("bamse"));
r.hits().add(new Hit("http://localhost/dummy", 0.5));
HttpSearchResponse s = new HttpSearchResponse(200, r, q, new DefaultRenderer());
assertEquals("text/xml", s.getContentType());
assertNull(s.getCoverage());
assertEquals("query 'dummy'", s.getParsedQuery());
assertEquals(5000, s.getTiming().getTimeout());
}
Aggregations