Search in sources :

Example 1 with RequestExecutor

use of com.stanfy.enroscar.net.operation.executor.RequestExecutor in project enroscar by stanfy.

the class RemoteServerApiConfigurationTest method createRequestDescription.

private RequestDescription createRequestDescription() {
    RequestBuilder<?> rb = new SimpleRequestBuilder<String>(Robolectric.application) {
    }.setUrl("http://example.com");
    final RequestDescription[] rd = new RequestDescription[1];
    rb.setExecutor(new RequestExecutor() {

        @Override
        public void performRequest(final RequestDescription d) {
            rd[0] = d;
        }
    });
    rb.execute();
    return rd[0];
}
Also used : RequestExecutor(com.stanfy.enroscar.net.operation.executor.RequestExecutor) RequestDescription(com.stanfy.enroscar.net.operation.RequestDescription)

Aggregations

RequestDescription (com.stanfy.enroscar.net.operation.RequestDescription)1 RequestExecutor (com.stanfy.enroscar.net.operation.executor.RequestExecutor)1