/** * Assert that the update from {@link #update} has or has not taken place. * This calls {@link #resetDefaultOptions()}, and the next call to {@link #serviceRequest(String...)} * will need to be setup after this call. * @param expected The expected result * @throws IOException */ protected void checkUpdate(boolean expected) throws IOException { resetDefaultOptions(); assertTrue(serviceRequest("query",askIfUpdated).contains(Boolean.toString(expected))); }
@Override public void setUp() throws Exception { super.setUp(); client = new DefaultHttpClient(newInstance()); resetDefaultOptions(); } @Override
if (entity != null ) { String encoding = "utf-8"; assertNotNull("Entity in " + resp.getStatusLine().getStatusCode()+" response must specify content type",entity.getContentType()); final Matcher m = charset.matcher(entity.getContentType().getValue()); if (m.find()) { fail(resp.getStatusLine().toString()+"\n"+ page); resetDefaultOptions();
protected ClientConnectionManager newInstance() { final ThreadSafeClientConnManager cm = new ThreadSafeClientConnManager( newSchemeRegistry()); // Increase max total connection to 200 cm.setMaxTotal(200); // Increase default max connection per route to 20 cm.setDefaultMaxPerRoute(20); // Increase max connections for localhost to 50 final HttpHost localhost = new HttpHost("locahost"); cm.setMaxForRoute(new HttpRoute(localhost), 50); return cm; }
if (entity != null ) { String encoding = "utf-8"; assertNotNull("Entity in " + resp.getStatusLine().getStatusCode()+" response must specify content type",entity.getContentType()); final Matcher m = charset.matcher(entity.getContentType().getValue()); if (m.find()) { fail(resp.getStatusLine().toString()+"\n"+ page); resetDefaultOptions();
protected ClientConnectionManager newInstance() { final ThreadSafeClientConnManager cm = new ThreadSafeClientConnManager( newSchemeRegistry()); // Increase max total connection to 200 cm.setMaxTotal(200); // Increase default max connection per route to 20 cm.setDefaultMaxPerRoute(20); // Increase max connections for localhost to 50 final HttpHost localhost = new HttpHost("locahost"); cm.setMaxForRoute(new HttpRoute(localhost), 50); return cm; }
/** * Assert that the update from {@link #update} has or has not taken place. * This calls {@link #resetDefaultOptions()}, and the next call to {@link #serviceRequest(String...)} * will need to be setup after this call. * @param expected The expected result * @throws IOException */ protected void checkUpdate(boolean expected) throws IOException { resetDefaultOptions(); assertTrue(serviceRequest("query",askIfUpdated).contains(Boolean.toString(expected))); }
@Override public void setUp() throws Exception { super.setUp(); client = new DefaultHttpClient(newInstance()); resetDefaultOptions(); } @Override