Java 类com.android.volley.Request.Method 实例源码

项目:iosched-reader    文件:HurlStackTest.java   
public void testConnectionForPatchRequest() throws Exception {
    TestRequest.Patch request = new TestRequest.Patch();
    assertEquals(request.getMethod(), Method.PATCH);

    HurlStack.setConnectionParametersForRequest(mMockConnection, request);
    assertEquals("PATCH", mMockConnection.getRequestMethod());
    assertFalse(mMockConnection.getDoOutput());
}
项目:GitHub    文件:HurlStackTest.java   
@Test public void connectionForDeprecatedGetRequest() throws Exception {
    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());
}
项目:GitHub    文件:HurlStackTest.java   
@Test public void connectionForDeprecatedPostRequest() throws Exception {
    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());
}
项目:GitHub    文件:HurlStackTest.java   
@Test public void connectionForGetRequest() throws Exception {
    TestRequest.Get request = new TestRequest.Get();
    assertEquals(request.getMethod(), Method.GET);

    HurlStack.setConnectionParametersForRequest(mMockConnection, request);
    assertEquals("GET", mMockConnection.getRequestMethod());
    assertFalse(mMockConnection.getDoOutput());
}
项目:iosched-reader    文件:HttpClientStackTest.java   
public void testCreatePatchRequestWithBody() throws Exception {
    TestRequest.PatchWithBody request = new TestRequest.PatchWithBody();
    assertEquals(request.getMethod(), Method.PATCH);

    HttpUriRequest httpRequest = HttpClientStack.createHttpRequest(request, null);
    assertTrue(httpRequest instanceof HttpPatch);
}
项目:GitHub    文件:HurlStackTest.java   
@Test public void connectionForPostWithBodyRequest() throws Exception {
    TestRequest.PostWithBody request = new TestRequest.PostWithBody();
    assertEquals(request.getMethod(), Method.POST);

    HurlStack.setConnectionParametersForRequest(mMockConnection, request);
    assertEquals("POST", mMockConnection.getRequestMethod());
    assertTrue(mMockConnection.getDoOutput());
}
项目:GitHub    文件:HurlStackTest.java   
@Test public void connectionForPutRequest() throws Exception {
    TestRequest.Put request = new TestRequest.Put();
    assertEquals(request.getMethod(), Method.PUT);

    HurlStack.setConnectionParametersForRequest(mMockConnection, request);
    assertEquals("PUT", mMockConnection.getRequestMethod());
    assertFalse(mMockConnection.getDoOutput());
}
项目:GitHub    文件:HurlStackTest.java   
@Test public void connectionForPutWithBodyRequest() throws Exception {
    TestRequest.PutWithBody request = new TestRequest.PutWithBody();
    assertEquals(request.getMethod(), Method.PUT);

    HurlStack.setConnectionParametersForRequest(mMockConnection, request);
    assertEquals("PUT", mMockConnection.getRequestMethod());
    assertTrue(mMockConnection.getDoOutput());
}
项目:GitHub    文件:HurlStackTest.java   
@Test public void connectionForDeleteRequest() throws Exception {
    TestRequest.Delete request = new TestRequest.Delete();
    assertEquals(request.getMethod(), Method.DELETE);

    HurlStack.setConnectionParametersForRequest(mMockConnection, request);
    assertEquals("DELETE", mMockConnection.getRequestMethod());
    assertFalse(mMockConnection.getDoOutput());
}
项目:GitHub    文件:HurlStackTest.java   
@Test public void connectionForHeadRequest() throws Exception {
    TestRequest.Head request = new TestRequest.Head();
    assertEquals(request.getMethod(), Method.HEAD);

    HurlStack.setConnectionParametersForRequest(mMockConnection, request);
    assertEquals("HEAD", mMockConnection.getRequestMethod());
    assertFalse(mMockConnection.getDoOutput());
}
项目:GitHub    文件:HurlStackTest.java   
@Test public void connectionForOptionsRequest() throws Exception {
    TestRequest.Options request = new TestRequest.Options();
    assertEquals(request.getMethod(), Method.OPTIONS);

    HurlStack.setConnectionParametersForRequest(mMockConnection, request);
    assertEquals("OPTIONS", mMockConnection.getRequestMethod());
    assertFalse(mMockConnection.getDoOutput());
}
项目:GitHub    文件:HurlStackTest.java   
@Test public void connectionForTraceRequest() throws Exception {
    TestRequest.Trace request = new TestRequest.Trace();
    assertEquals(request.getMethod(), Method.TRACE);

    HurlStack.setConnectionParametersForRequest(mMockConnection, request);
    assertEquals("TRACE", mMockConnection.getRequestMethod());
    assertFalse(mMockConnection.getDoOutput());
}
项目:GitHub    文件:HurlStackTest.java   
@Test public void connectionForPatchRequest() throws Exception {
    TestRequest.Patch request = new TestRequest.Patch();
    assertEquals(request.getMethod(), Method.PATCH);

    HurlStack.setConnectionParametersForRequest(mMockConnection, request);
    assertEquals("PATCH", mMockConnection.getRequestMethod());
    assertFalse(mMockConnection.getDoOutput());
}
项目:GitHub    文件:HurlStackTest.java   
@Test public void connectionForPatchWithBodyRequest() throws Exception {
    TestRequest.PatchWithBody request = new TestRequest.PatchWithBody();
    assertEquals(request.getMethod(), Method.PATCH);

    HurlStack.setConnectionParametersForRequest(mMockConnection, request);
    assertEquals("PATCH", mMockConnection.getRequestMethod());
    assertTrue(mMockConnection.getDoOutput());
}
项目:GitHub    文件:HttpClientStackTest.java   
@Test public void createDeprecatedPostRequest() throws Exception {
    TestRequest.DeprecatedPost request = new TestRequest.DeprecatedPost();
    assertEquals(request.getMethod(), Method.DEPRECATED_GET_OR_POST);

    HttpUriRequest httpRequest = HttpClientStack.createHttpRequest(request, null);
    assertTrue(httpRequest instanceof HttpPost);
}
项目:GitHub    文件:HttpClientStackTest.java   
@Test public void createGetRequest() throws Exception {
    TestRequest.Get request = new TestRequest.Get();
    assertEquals(request.getMethod(), Method.GET);

    HttpUriRequest httpRequest = HttpClientStack.createHttpRequest(request, null);
    assertTrue(httpRequest instanceof HttpGet);
}
项目:GitHub    文件:HttpClientStackTest.java   
@Test public void createPostRequest() throws Exception {
    TestRequest.Post request = new TestRequest.Post();
    assertEquals(request.getMethod(), Method.POST);

    HttpUriRequest httpRequest = HttpClientStack.createHttpRequest(request, null);
    assertTrue(httpRequest instanceof HttpPost);
}
项目:iosched-reader    文件:HurlStackTest.java   
public void testConnectionForOptionsRequest() throws Exception {
    TestRequest.Options request = new TestRequest.Options();
    assertEquals(request.getMethod(), Method.OPTIONS);

    HurlStack.setConnectionParametersForRequest(mMockConnection, request);
    assertEquals("OPTIONS", mMockConnection.getRequestMethod());
    assertFalse(mMockConnection.getDoOutput());
}
项目:GitHub    文件:HttpClientStackTest.java   
@Test public void createPutRequest() throws Exception {
    TestRequest.Put request = new TestRequest.Put();
    assertEquals(request.getMethod(), Method.PUT);

    HttpUriRequest httpRequest = HttpClientStack.createHttpRequest(request, null);
    assertTrue(httpRequest instanceof HttpPut);
}
项目:GitHub    文件:HttpClientStackTest.java   
@Test public void createPutRequestWithBody() throws Exception {
    TestRequest.PutWithBody request = new TestRequest.PutWithBody();
    assertEquals(request.getMethod(), Method.PUT);

    HttpUriRequest httpRequest = HttpClientStack.createHttpRequest(request, null);
    assertTrue(httpRequest instanceof HttpPut);
}
项目:GitHub    文件:HttpClientStackTest.java   
@Test public void createDeleteRequest() throws Exception {
    TestRequest.Delete request = new TestRequest.Delete();
    assertEquals(request.getMethod(), Method.DELETE);

    HttpUriRequest httpRequest = HttpClientStack.createHttpRequest(request, null);
    assertTrue(httpRequest instanceof HttpDelete);
}
项目:iosched-reader    文件:HttpClientStackTest.java   
public void testCreateOptionsRequest() throws Exception {
    TestRequest.Options request = new TestRequest.Options();
    assertEquals(request.getMethod(), Method.OPTIONS);

    HttpUriRequest httpRequest = HttpClientStack.createHttpRequest(request, null);
    assertTrue(httpRequest instanceof HttpOptions);
}
项目:GitHub    文件:HttpClientStackTest.java   
@Test public void createOptionsRequest() throws Exception {
    TestRequest.Options request = new TestRequest.Options();
    assertEquals(request.getMethod(), Method.OPTIONS);

    HttpUriRequest httpRequest = HttpClientStack.createHttpRequest(request, null);
    assertTrue(httpRequest instanceof HttpOptions);
}
项目:GitHub    文件:HttpClientStackTest.java   
@Test public void createTraceRequest() throws Exception {
    TestRequest.Trace request = new TestRequest.Trace();
    assertEquals(request.getMethod(), Method.TRACE);

    HttpUriRequest httpRequest = HttpClientStack.createHttpRequest(request, null);
    assertTrue(httpRequest instanceof HttpTrace);
}
项目:GitHub    文件:HttpClientStackTest.java   
@Test public void createPatchRequest() throws Exception {
    TestRequest.Patch request = new TestRequest.Patch();
    assertEquals(request.getMethod(), Method.PATCH);

    HttpUriRequest httpRequest = HttpClientStack.createHttpRequest(request, null);
    assertTrue(httpRequest instanceof HttpPatch);
}
项目:GitHub    文件:HttpClientStackTest.java   
@Test public void createPatchRequestWithBody() throws Exception {
    TestRequest.PatchWithBody request = new TestRequest.PatchWithBody();
    assertEquals(request.getMethod(), Method.PATCH);

    HttpUriRequest httpRequest = HttpClientStack.createHttpRequest(request, null);
    assertTrue(httpRequest instanceof HttpPatch);
}
项目:GitHub    文件:HurlStackTest.java   
@Test public void connectionForDeprecatedGetRequest() throws Exception {
    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());
}
项目:GitHub    文件:HurlStackTest.java   
@Test public void connectionForDeprecatedPostRequest() throws Exception {
    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());
}
项目:iosched-reader    文件:HttpClientStackTest.java   
public void testCreateDeleteRequest() throws Exception {
    TestRequest.Delete request = new TestRequest.Delete();
    assertEquals(request.getMethod(), Method.DELETE);

    HttpUriRequest httpRequest = HttpClientStack.createHttpRequest(request, null);
    assertTrue(httpRequest instanceof HttpDelete);
}
项目:GitHub    文件:HurlStackTest.java   
@Test public void connectionForPostRequest() throws Exception {
    TestRequest.Post request = new TestRequest.Post();
    assertEquals(request.getMethod(), Method.POST);

    HurlStack.setConnectionParametersForRequest(mMockConnection, request);
    assertEquals("POST", mMockConnection.getRequestMethod());
    assertFalse(mMockConnection.getDoOutput());
}
项目:iosched-reader    文件:HttpClientStackTest.java   
public void testCreatePutRequest() throws Exception {
    TestRequest.Put request = new TestRequest.Put();
    assertEquals(request.getMethod(), Method.PUT);

    HttpUriRequest httpRequest = HttpClientStack.createHttpRequest(request, null);
    assertTrue(httpRequest instanceof HttpPut);
}
项目:GitHub    文件:HurlStackTest.java   
@Test public void connectionForPutRequest() throws Exception {
    TestRequest.Put request = new TestRequest.Put();
    assertEquals(request.getMethod(), Method.PUT);

    HurlStack.setConnectionParametersForRequest(mMockConnection, request);
    assertEquals("PUT", mMockConnection.getRequestMethod());
    assertFalse(mMockConnection.getDoOutput());
}
项目:iosched-reader    文件:HurlStackTest.java   
public void testConnectionForTraceRequest() throws Exception {
    TestRequest.Trace request = new TestRequest.Trace();
    assertEquals(request.getMethod(), Method.TRACE);

    HurlStack.setConnectionParametersForRequest(mMockConnection, request);
    assertEquals("TRACE", mMockConnection.getRequestMethod());
    assertFalse(mMockConnection.getDoOutput());
}
项目:GitHub    文件:HurlStackTest.java   
@Test public void connectionForDeleteRequest() throws Exception {
    TestRequest.Delete request = new TestRequest.Delete();
    assertEquals(request.getMethod(), Method.DELETE);

    HurlStack.setConnectionParametersForRequest(mMockConnection, request);
    assertEquals("DELETE", mMockConnection.getRequestMethod());
    assertFalse(mMockConnection.getDoOutput());
}
项目:GitHub    文件:HurlStackTest.java   
@Test public void connectionForHeadRequest() throws Exception {
    TestRequest.Head request = new TestRequest.Head();
    assertEquals(request.getMethod(), Method.HEAD);

    HurlStack.setConnectionParametersForRequest(mMockConnection, request);
    assertEquals("HEAD", mMockConnection.getRequestMethod());
    assertFalse(mMockConnection.getDoOutput());
}
项目:GitHub    文件:HurlStackTest.java   
@Test public void connectionForOptionsRequest() throws Exception {
    TestRequest.Options request = new TestRequest.Options();
    assertEquals(request.getMethod(), Method.OPTIONS);

    HurlStack.setConnectionParametersForRequest(mMockConnection, request);
    assertEquals("OPTIONS", mMockConnection.getRequestMethod());
    assertFalse(mMockConnection.getDoOutput());
}
项目:GitHub    文件:HurlStackTest.java   
@Test public void connectionForTraceRequest() throws Exception {
    TestRequest.Trace request = new TestRequest.Trace();
    assertEquals(request.getMethod(), Method.TRACE);

    HurlStack.setConnectionParametersForRequest(mMockConnection, request);
    assertEquals("TRACE", mMockConnection.getRequestMethod());
    assertFalse(mMockConnection.getDoOutput());
}
项目:GitHub    文件:HurlStackTest.java   
@Test public void connectionForPatchRequest() throws Exception {
    TestRequest.Patch request = new TestRequest.Patch();
    assertEquals(request.getMethod(), Method.PATCH);

    HurlStack.setConnectionParametersForRequest(mMockConnection, request);
    assertEquals("PATCH", mMockConnection.getRequestMethod());
    assertFalse(mMockConnection.getDoOutput());
}
项目:GitHub    文件:HurlStackTest.java   
@Test public void connectionForPatchWithBodyRequest() throws Exception {
    TestRequest.PatchWithBody request = new TestRequest.PatchWithBody();
    assertEquals(request.getMethod(), Method.PATCH);

    HurlStack.setConnectionParametersForRequest(mMockConnection, request);
    assertEquals("PATCH", mMockConnection.getRequestMethod());
    assertTrue(mMockConnection.getDoOutput());
}
项目:GitHub    文件:HttpClientStackTest.java   
@Test public void createDeprecatedGetRequest() throws Exception {
    TestRequest.DeprecatedGet request = new TestRequest.DeprecatedGet();
    assertEquals(request.getMethod(), Method.DEPRECATED_GET_OR_POST);

    HttpUriRequest httpRequest = HttpClientStack.createHttpRequest(request, null);
    assertTrue(httpRequest instanceof HttpGet);
}