Search in sources :

Example 26 with MockWebServer

use of com.google.mockwebserver.MockWebServer in project j2objc by google.

the class OldCookieHandlerTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    server = new MockWebServer();
}
Also used : MockWebServer(com.google.mockwebserver.MockWebServer)

Example 27 with MockWebServer

use of com.google.mockwebserver.MockWebServer in project robospice by stephanenicolas.

the class SpiceArrayAdapterTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    cacheFile = new File(getContext().getCacheDir(), "Foo");
    cacheFile.delete();
    mockWebServer = new MockWebServer();
    spiceManager = new BitmapSpiceManagerUnderTest();
    spiceManager.start(getContext());
    data = new ArrayList<DataUnderTest>();
    data1 = new DataUnderTest();
    data1.setFoo("data1");
    data1.setImageUrl("data1.png");
    data2 = new DataUnderTest();
    data2.setFoo("data2");
    data2.setImageUrl("data2.png");
    data.add(data1);
    data.add(data2);
    adapter = new SpiceArrayAdapterUnderTest(getContext(), spiceManager, data);
}
Also used : MockWebServer(com.google.mockwebserver.MockWebServer) File(java.io.File)

Example 28 with MockWebServer

use of com.google.mockwebserver.MockWebServer in project robospice by stephanenicolas.

the class SimpleTextRequestTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    mockWebServer = new MockWebServer();
}
Also used : MockWebServer(com.google.mockwebserver.MockWebServer)

Example 29 with MockWebServer

use of com.google.mockwebserver.MockWebServer in project robospice by stephanenicolas.

the class SmallBinaryRequestTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    mockWebServer = new MockWebServer();
}
Also used : MockWebServer(com.google.mockwebserver.MockWebServer)

Example 30 with MockWebServer

use of com.google.mockwebserver.MockWebServer in project robospice by stephanenicolas.

the class BigBinaryRequestTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    mockWebServer = new MockWebServer();
    cacheFile = new File(getContext().getCacheDir(), "test");
    cacheFile.delete();
}
Also used : MockWebServer(com.google.mockwebserver.MockWebServer) File(java.io.File)

Aggregations

MockWebServer (com.google.mockwebserver.MockWebServer)56 MockResponse (com.google.mockwebserver.MockResponse)39 CookieManager (java.net.CookieManager)15 RecordedRequest (com.google.mockwebserver.RecordedRequest)14 Test (org.junit.Test)14 ByteBuf (io.netty.buffer.ByteBuf)13 HttpCookie (java.net.HttpCookie)11 BaseLoadBalancer (com.netflix.loadbalancer.BaseLoadBalancer)7 Server (com.netflix.loadbalancer.Server)7 IClientConfig (com.netflix.client.config.IClientConfig)6 AvailabilityFilteringRule (com.netflix.loadbalancer.AvailabilityFilteringRule)6 DummyPing (com.netflix.loadbalancer.DummyPing)6 HttpResourceGroup (com.netflix.ribbon.http.HttpResourceGroup)6 IOException (java.io.IOException)6 HttpHost (org.apache.http.HttpHost)6 HttpResponse (org.apache.http.HttpResponse)6 HttpClient (org.apache.http.client.HttpClient)6 HttpGet (org.apache.http.client.methods.HttpGet)6 DefaultHttpClient (org.apache.http.impl.client.DefaultHttpClient)6 Map (java.util.Map)5