Package com.eclipsesource.jaxrs.consumer.internal

Examples of com.eclipsesource.jaxrs.consumer.internal.RequestError


    new RequestException( null );
  }
 
  @Test
  public void testHasStatus() {
    RequestError error = mock( RequestError.class );
    when( error.getStatus() ).thenReturn( 233 );
    RequestException exception = new RequestException( error );
   
    int status = exception.getStatus();
   
    assertEquals( 233, status );
View Full Code Here


    assertEquals( 233, status );
  }
 
  @Test
  public void testHasMessage() {
    RequestError error = mock( RequestError.class );
    when( error.getMessage() ).thenReturn( "foo" );
    RequestException exception = new RequestException( error );
   
    String message = exception.getMessage();
   
    assertEquals( "foo", message );
View Full Code Here

    assertEquals( "foo", message );
  }
 
  @Test
  public void testHasEntity() {
    RequestError error = mock( RequestError.class );
    when( error.getEntity() ).thenReturn( "foo" );
    RequestException exception = new RequestException( error );
   
    String entity = exception.getEntity();
   
    assertEquals( "foo", entity );
View Full Code Here

    assertEquals( "foo", entity );
  }
 
  @Test
  public void testHasMethod() {
    RequestError error = mock( RequestError.class );
    when( error.getMethod() ).thenReturn( "foo" );
    RequestException exception = new RequestException( error );
   
    String method = exception.getMethod();
   
    assertEquals( "foo", method );
View Full Code Here

    assertEquals( "foo", method );
  }
 
  @Test
  public void testHasUrl() {
    RequestError error = mock( RequestError.class );
    when( error.getRequestUrl() ).thenReturn( "foo" );
    RequestException exception = new RequestException( error );
   
    String url = exception.getRequestUrl();
   
    assertEquals( "foo", url );
View Full Code Here

  }
 
  @Test
  @SuppressWarnings( { "rawtypes", "unchecked" } )
  public void testHasHeaders() {
    RequestError error = mock( RequestError.class );
    when( error.getRequestUrl() ).thenReturn( "foo" );
    MultivaluedMap headers = mock( MultivaluedMap.class );
    when( error.getHeaders() ).thenReturn( headers );
    RequestException exception = new RequestException( error );
   
    MultivaluedMap<String, Object> actualHeaders = exception.getHeaders();
   
    assertSame( headers, actualHeaders );
View Full Code Here

TOP

Related Classes of com.eclipsesource.jaxrs.consumer.internal.RequestError

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.