Package com.google.dataconnector.client.fetchrequest

Examples of com.google.dataconnector.client.fetchrequest.HttpFetchStrategy


    EasyMock.expect(resp.getStatusLine()).andReturn(st);
    EasyMock.expect(resp.getEntity()).andReturn(ent);
    EasyMock.expect(resp.getAllHeaders()).andReturn(headers);
    EasyMock.replay(st, resp);
   
    HttpFetchStrategy s = new HttpFetchStrategy() {
        @Override
        HttpResponse getHttpResponse(FetchRequest request) throws StrategyException {
          // Mock the response
          return resp;
        }
      };
    s.process(ar, builder);
   
    assertFalse("Strategy shouldn't have to set the id.", builder.hasId());
    assertTrue("Must return a status.", builder.hasStatus());
    assertEquals(status, builder.getStatus());
    assertFalse("The mock has no contents.", builder.hasContents());
View Full Code Here

TOP

Related Classes of com.google.dataconnector.client.fetchrequest.HttpFetchStrategy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.