Methods Summary |
---|
protected void | setUp()
super.setUp();
mContext = getContext();
mMockConnection = new MockHttpURLConnection();
|
public void | testConnectionForDeleteRequest()
TestRequest.Delete request = new TestRequest.Delete();
assertEquals(request.getMethod(), Method.DELETE);
HurlStack.setConnectionParametersForRequest(mMockConnection, request);
assertEquals("DELETE", mMockConnection.getRequestMethod());
assertFalse(mMockConnection.getDoOutput());
|
public void | testConnectionForDeprecatedGetRequest()
TestRequest.DeprecatedGet request = new TestRequest.DeprecatedGet();
assertEquals(request.getMethod(), Method.DEPRECATED_GET_OR_POST);
HurlStack.setConnectionParametersForRequest(mMockConnection, request);
assertEquals("GET", mMockConnection.getRequestMethod());
assertFalse(mMockConnection.getDoOutput());
|
public void | testConnectionForDeprecatedPostRequest()
TestRequest.DeprecatedPost request = new TestRequest.DeprecatedPost();
assertEquals(request.getMethod(), Method.DEPRECATED_GET_OR_POST);
HurlStack.setConnectionParametersForRequest(mMockConnection, request);
assertEquals("POST", mMockConnection.getRequestMethod());
assertTrue(mMockConnection.getDoOutput());
|
public void | testConnectionForGetRequest()
TestRequest.Get request = new TestRequest.Get();
assertEquals(request.getMethod(), Method.GET);
HurlStack.setConnectionParametersForRequest(mMockConnection, request);
assertEquals("GET", mMockConnection.getRequestMethod());
assertFalse(mMockConnection.getDoOutput());
|
public void | testConnectionForHeadRequest()
TestRequest.Head request = new TestRequest.Head();
assertEquals(request.getMethod(), Method.HEAD);
HurlStack.setConnectionParametersForRequest(mMockConnection, request);
assertEquals("HEAD", mMockConnection.getRequestMethod());
assertFalse(mMockConnection.getDoOutput());
|
public void | testConnectionForOptionsRequest()
TestRequest.Options request = new TestRequest.Options();
assertEquals(request.getMethod(), Method.OPTIONS);
HurlStack.setConnectionParametersForRequest(mMockConnection, request);
assertEquals("OPTIONS", mMockConnection.getRequestMethod());
assertFalse(mMockConnection.getDoOutput());
|
public void | testConnectionForPatchRequest()
TestRequest.Patch request = new TestRequest.Patch();
assertEquals(request.getMethod(), Method.PATCH);
HurlStack.setConnectionParametersForRequest(mMockConnection, request);
assertEquals("PATCH", mMockConnection.getRequestMethod());
assertFalse(mMockConnection.getDoOutput());
|
public void | testConnectionForPatchWithBodyRequest()
TestRequest.PatchWithBody request = new TestRequest.PatchWithBody();
assertEquals(request.getMethod(), Method.PATCH);
HurlStack.setConnectionParametersForRequest(mMockConnection, request);
assertEquals("PATCH", mMockConnection.getRequestMethod());
assertTrue(mMockConnection.getDoOutput());
|
public void | testConnectionForPostRequest()
TestRequest.Post request = new TestRequest.Post();
assertEquals(request.getMethod(), Method.POST);
HurlStack.setConnectionParametersForRequest(mMockConnection, request);
assertEquals("POST", mMockConnection.getRequestMethod());
assertFalse(mMockConnection.getDoOutput());
|
public void | testConnectionForPostWithBodyRequest()
TestRequest.PostWithBody request = new TestRequest.PostWithBody();
assertEquals(request.getMethod(), Method.POST);
HurlStack.setConnectionParametersForRequest(mMockConnection, request);
assertEquals("POST", mMockConnection.getRequestMethod());
assertTrue(mMockConnection.getDoOutput());
|
public void | testConnectionForPutRequest()
TestRequest.Put request = new TestRequest.Put();
assertEquals(request.getMethod(), Method.PUT);
HurlStack.setConnectionParametersForRequest(mMockConnection, request);
assertEquals("PUT", mMockConnection.getRequestMethod());
assertFalse(mMockConnection.getDoOutput());
|
public void | testConnectionForPutWithBodyRequest()
TestRequest.PutWithBody request = new TestRequest.PutWithBody();
assertEquals(request.getMethod(), Method.PUT);
HurlStack.setConnectionParametersForRequest(mMockConnection, request);
assertEquals("PUT", mMockConnection.getRequestMethod());
assertTrue(mMockConnection.getDoOutput());
|
public void | testConnectionForTraceRequest()
TestRequest.Trace request = new TestRequest.Trace();
assertEquals(request.getMethod(), Method.TRACE);
HurlStack.setConnectionParametersForRequest(mMockConnection, request);
assertEquals("TRACE", mMockConnection.getRequestMethod());
assertFalse(mMockConnection.getDoOutput());
|