Java Code Examples for com.android.volley.mock.TestRequest#DeprecatedGet

The following examples show how to use com.android.volley.mock.TestRequest#DeprecatedGet . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HurlStackTest.java    From volley with Apache License 2.0 5 votes vote down vote up
@Test
public void connectionForDeprecatedGetRequest() throws Exception {
    TestRequest.DeprecatedGet request = new TestRequest.DeprecatedGet();
    assertEquals(request.getMethod(), Method.DEPRECATED_GET_OR_POST);

    mHurlStack.setConnectionParametersForRequest(mMockConnection, request);
    verify(mMockConnection, never()).setRequestMethod(anyString());
    verify(mMockConnection, never()).setDoOutput(true);
}
 
Example 2
Source File: HttpClientStackTest.java    From volley with Apache License 2.0 5 votes vote down vote up
@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);
}
 
Example 3
Source File: HurlStackTest.java    From device-database with Apache License 2.0 5 votes vote down vote up
@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());
}
 
Example 4
Source File: HttpClientStackTest.java    From device-database with Apache License 2.0 5 votes vote down vote up
@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);
}
 
Example 5
Source File: HurlStackTest.java    From SaveVolley with Apache License 2.0 5 votes vote down vote up
@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());
}
 
Example 6
Source File: HttpClientStackTest.java    From SaveVolley with Apache License 2.0 5 votes vote down vote up
@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);
}
 
Example 7
Source File: HurlStackTest.java    From android-project-wo2b with Apache License 2.0 5 votes vote down vote up
public void testConnectionForDeprecatedGetRequest() 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());
}
 
Example 8
Source File: HttpClientStackTest.java    From android-project-wo2b with Apache License 2.0 5 votes vote down vote up
public void testCreateDeprecatedGetRequest() 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);
}
 
Example 9
Source File: HurlStackTest.java    From android-discourse with Apache License 2.0 5 votes vote down vote up
public void testConnectionForDeprecatedGetRequest() 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());
}
 
Example 10
Source File: HttpClientStackTest.java    From android-discourse with Apache License 2.0 5 votes vote down vote up
public void testCreateDeprecatedGetRequest() 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);
}
 
Example 11
Source File: HurlStackTest.java    From product-emm with Apache License 2.0 5 votes vote down vote up
@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());
}
 
Example 12
Source File: HttpClientStackTest.java    From product-emm with Apache License 2.0 5 votes vote down vote up
@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);
}
 
Example 13
Source File: HurlStackTest.java    From product-emm with Apache License 2.0 5 votes vote down vote up
@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());
}
 
Example 14
Source File: HttpClientStackTest.java    From product-emm with Apache License 2.0 5 votes vote down vote up
@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);
}
 
Example 15
Source File: HurlStackTest.java    From CrossBow with Apache License 2.0 5 votes vote down vote up
@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());
}
 
Example 16
Source File: HttpClientStackTest.java    From CrossBow with Apache License 2.0 5 votes vote down vote up
@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);
}