Package com.eclipsesource.restfuse

Examples of com.eclipsesource.restfuse.RequestContext


  private Destination getDestination() {
    Destination destination = new Destination( this,
                                               "http://search.maven.org/remotecontent?filepath="
                                           + "com/restfuse/com.eclipsesource.restfuse/{version}/" );
    RequestContext context = destination.getRequestContext();
    context.addPathSegment( "file", "com.eclipsesource.restfuse-1.1.1" ).addPathSegment( "version", "1.1.1" );
    return destination;
  }
View Full Code Here


    HttpTest annotation = createAnnotation( "/people/{id}/{name}" );
    when( description.getAnnotation( HttpTest.class ) ).thenReturn( annotation );
    RequestConfiguration config = new RequestConfiguration( "http://www.fake.com",
                                                            description,
                                                            new Object() );
    RequestContext context = new RequestContext();

    context.addPathSegment( "id", "12345" );
    context.addPathSegment( "name", "name" );
    InternalRequest request = config.createRequest( context );
   
    assertEquals( "http://www.fake.com/people/12345/name", request.getUrl() );
  }
View Full Code Here

    HttpTest annotation = createAnnotation( "/people/{invalid}/name" );
    when( method.getAnnotation( HttpTest.class ) ).thenReturn( annotation );
    RequestConfiguration config = new RequestConfiguration( "http://www.fake.com",
                                                            method,
                                                            new Object() );
    RequestContext context = new RequestContext();
    context.addPathSegment( "id", "12345" );
    config.createRequest( context );
  }
View Full Code Here

TOP

Related Classes of com.eclipsesource.restfuse.RequestContext

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.