@Test public void setCredentialsTest() { this.executor = new RequestExecutor(new HttpPost("link.html?asdasd=123"), factory, mock(Settings.class)); executor.setCredentials(new UsernamePasswordCredentials("trololo", "jeejee")); assertTrue(executor.toString().contains("trololo")); assertTrue(executor.toString().contains("jeejee")); executor.setCredentials("username", "password"); assertTrue(executor.toString().contains("username password")); }
public RequestExecutor setCredentials(String username, String password) { return setCredentials(new UsernamePasswordCredentials(username, password)); }
RequestExecutor { public RequestExecutor setCredentials(String username, String password) { return setCredentials(new UsernamePasswordCredentials(username, password)); } }
RequestExecutor { public RequestExecutor setCredentials(String username, String password) { return setCredentials(new UsernamePasswordCredentials(username, password)); } RequestExecutor(String url, HttpClientFactory factory, Settings settings);   RequestExecutor(HttpUriRequest request, HttpClientFactory factory, Settings settings); }
RequestExecutor { public RequestExecutor setCredentials(String username, String password) { return setCredentials(new UsernamePasswordCredentials(username, password)); } RequestExecutor(String url, HttpClientFactory factory, Settings settings);   RequestExecutor(HttpUriRequest request, HttpClientFactory factory, Settings settings); RequestExecutor setCredentials(String username, String password); RequestExecutor setCredentials(UsernamePasswordCredentials credentials); BufferedHttpEntity execute(); @Override String toString(); }
RequestExecutor { public RequestExecutor setCredentials(String username, String password) { return setCredentials(new UsernamePasswordCredentials(username, password)); } RequestExecutor(String url, HttpClientFactory factory, Settings settings);   RequestExecutor(HttpUriRequest request, HttpClientFactory factory, Settings settings); RequestExecutor setCredentials(String username, String password); RequestExecutor setCredentials(UsernamePasswordCredentials credentials); BufferedHttpEntity execute(); @Override String toString();  }