Package com.linkedin.restli.internal.server

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


  @Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "routingDetailsSimple")
  public void testRoutingDetailsSimpleGet(ProtocolVersion version, String uri) throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap = buildResourceModels(TrendingResource.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 + "routingDetailsSimple")
  public void testRoutingDetailsSimpleUpdate(ProtocolVersion version, String uri) throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap = buildResourceModels(TrendingResource.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 + "routingDetailsSimple")
  public void testRoutingDetailsSimplePartialUpdate(ProtocolVersion version, String uri) throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap = buildResourceModels(TrendingResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

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

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

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

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

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

                                         String methodName,
                                         Set<Long> keys) throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap =
      buildResourceModels(StatusCollectionResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

    checkResult(uri, version, httpMethod, restliMethod, method, StatusCollectionResource.class, methodName, true);
    checkBatchKeys(uri, version, httpMethod, keys);
  }
View Full Code Here

                                                    Set<Long> keys) throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap =
      buildResourceModels(StatusCollectionResource.class,
                          RepliesCollectionResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

    checkResult(uri, version, httpMethod, restliMethod, method, RepliesCollectionResource.class, methodName, true);
    checkBatchKeys(uri, version, httpMethod, keys);
  }
View Full Code Here

                                                Set<String> keys) throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap =
      buildResourceModels(TrendingResource.class,
                          TrendRegionsCollectionResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

    checkResult(uri, version, httpMethod, restliMethod, method, TrendRegionsCollectionResource.class, methodName, true);
    checkBatchKeys(uri, version, httpMethod, keys);
  }
View Full Code Here

                                          ResourceMethod method,
                                          String methodName,
                                          Set<CompoundKey> compoundKeys) throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap = buildResourceModels(FollowsAssociativeResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

    checkResult(uri, version, httpMethod, restliMethod, method, FollowsAssociativeResource.class, methodName, true);
    checkBatchKeys(uri, version, httpMethod, compoundKeys);
  }
View Full Code Here

                                         String methodName,
                                         Set<ComplexResourceKey<TwitterTestDataModels.DiscoveredItemKey,
                                                                TwitterTestDataModels.DiscoveredItemKeyParams>> compoundKeys) throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap = buildResourceModels(DiscoveredItemsResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

    checkResult(uri, version, httpMethod, restliMethod, method, DiscoveredItemsResource.class, methodName, true);
    checkBatchKeys(uri, version, httpMethod, compoundKeys);
  }
View Full Code Here

  @Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "routingCollection")
  public void testRoutingCollection(String uri, ProtocolVersion version, String httpMethod, String restliMethod, ResourceMethod method, String methodName, String[] pathKeys) throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap =
      buildResourceModels(StatusCollectionResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

    checkResult(uri, version, httpMethod, restliMethod, method, StatusCollectionResource.class, methodName, false, pathKeys);
  }
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.