Package com.linkedin.restli.internal.server

Examples of com.linkedin.restli.internal.server.RestLiRouter


  @Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "actionRootRouting")
  public void testActionRootRouting(ProtocolVersion version, String uri) throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap = buildResourceModels(TwitterAccountsResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

    RestRequest request = createRequest(uri, "POST", version);
    RoutingResult result = _router.process(request, new RequestContext());
    assertNotNull(result);
    assertEquals(result.getResourceMethod().getActionName(), "register");
View Full Code Here


  public void testActionNestedRouting(ProtocolVersion version, String uri) throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap =
      buildResourceModels(StatusCollectionResource.class,
                          RepliesCollectionResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

    RestRequest request = createRequest(uri, "POST", version);
    RoutingResult result = _router.process(request, new RequestContext());
    assertNotNull(result);
    assertEquals(result.getResourceMethod().getActionName(), "replyToAll");
View Full Code Here

  public void testActionNestedSimpleRouting(ProtocolVersion version, String uri) throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap =
      buildResourceModels(StatusCollectionResource.class,
                          LocationResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

    RestRequest request = createRequest(uri, "POST", version);
    RoutingResult result = _router.process(request, new RequestContext());
    assertNotNull(result);
    assertEquals(result.getResourceMethod().getActionName(), "new_status_from_location");
View Full Code Here

                          RepliesCollectionResource.class,
                          StatusCollectionResource.class,
                          TrendRegionsCollectionResource.class,
                          TrendingResource.class,
                          TwitterAccountsResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

    expectRoutingException(uri, version, httpMethod);
  }
View Full Code Here

  public void testDefaultPathKeyUniqueness(ProtocolVersion version, String uri) throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap =
      buildResourceModels(CombinedResources.CombinedCollectionWithSubresources.class,
                          CombinedResources.SubCollectionResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

    RestRequest request;
    RoutingResult result;

    // #1 simple GET
View Full Code Here

  @Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "routingDetailsCollectionEntity")
  public void testRoutingDetailsCollectionGet(ProtocolVersion version, String uri) throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap = buildResourceModels(StatusCollectionResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

    // #1 simple GET
    RestRequest request = createRequest(uri, "GET", version);

    RoutingResult result = _router.process(request, new RequestContext());
View Full Code Here

  @Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "routingDetailsAssociationEntity")
  public void testRoutingDetailsAssociationGet(ProtocolVersion version, String uri) throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap = buildResourceModels(FollowsAssociativeResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

    RestRequest request = createRequest(uri, "GET", version);

    RoutingResult result = _router.process(request, new RequestContext());
    assertNotNull(result);
View Full Code Here

  @Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "routingDetailsCollectionEntity")
  public void testRoutingDetailsCollectionUpdate(ProtocolVersion version, String uri) throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap = buildResourceModels(StatusCollectionResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

    RestRequest request = createRequest(uri, "PUT", version);

    RoutingResult result = _router.process(request, new RequestContext());
    assertNotNull(result);
View Full Code Here

  @Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "routingDetailsCollectionEntity")
  public void testRoutingDetailsCollectionDelete(ProtocolVersion version, String uri) throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap = buildResourceModels(StatusCollectionResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

    RestRequest request = createRequest(uri, "DELETE", version);

    RoutingResult result = _router.process(request, new RequestContext());
    assertNotNull(result);
View Full Code Here

  @Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "routingDetailsAssociationBatch")
  public void testRoutingDetailsAssociationBatchGet(ProtocolVersion version, String uri) throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap = buildResourceModels(FollowsAssociativeResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

    RestRequest request = createRequest(uri, "GET", version);

    RoutingResult result = _router.process(request, new RequestContext());
    assertNotNull(result);
View Full Code Here

TOP

Related Classes of com.linkedin.restli.internal.server.RestLiRouter

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.