Package com.eclipsesource.jaxrs.consumer.test.TestUtil

Examples of com.eclipsesource.jaxrs.consumer.test.TestUtil.CustomType


 
  @Test
  public void testSimpleGetWithCustomProvider() {
    driver.addExpectation( onRequestTo( "/test" ).withMethod( GET ), giveResponse( "get", TEXT_PLAIN ) );
   
    CustomType content = resource.getContent();
    assertEquals( "get", content.getValue() );
  }
View Full Code Here


    assertEquals( "get", content.getValue() );
  }
 
  @Test
  public void testSimplePostWithCustomProvider() {
    CustomType customType = new CustomType( "foo" );
    driver.addExpectation( onRequestTo( "/test" )
                           .withMethod( POST )
                           .withBody( customType.getValue(), TEXT_PLAIN ), giveResponse( "bar", TEXT_PLAIN ) );
   
    CustomType content = resource.postContent( customType );
    assertEquals( "bar", content.getValue() );
  }
View Full Code Here

TOP

Related Classes of com.eclipsesource.jaxrs.consumer.test.TestUtil.CustomType

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.