Package com.linkedin.restli.internal.server.model

Examples of com.linkedin.restli.internal.server.model.ResourceModel.findMethod()


    assertNotNull(followsModel.findMethod(ResourceMethod.BATCH_DELETE));
    assertNotNull(followsModel.findMethod(ResourceMethod.BATCH_GET));
    assertNotNull(followsModel.findMethod(ResourceMethod.BATCH_UPDATE));
    assertNotNull(followsModel.findMethod(ResourceMethod.BATCH_PARTIAL_UPDATE));

    assertNull(followsModel.findMethod(ResourceMethod.DELETE));
    assertNull(followsModel.findMethod(ResourceMethod.CREATE));
    assertNull(followsModel.findMethod(ResourceMethod.BATCH_CREATE));
  }

  @Test
View Full Code Here


    assertNotNull(followsModel.findMethod(ResourceMethod.BATCH_GET));
    assertNotNull(followsModel.findMethod(ResourceMethod.BATCH_UPDATE));
    assertNotNull(followsModel.findMethod(ResourceMethod.BATCH_PARTIAL_UPDATE));

    assertNull(followsModel.findMethod(ResourceMethod.DELETE));
    assertNull(followsModel.findMethod(ResourceMethod.CREATE));
    assertNull(followsModel.findMethod(ResourceMethod.BATCH_CREATE));
  }

  @Test
  public void testInvalidSingleAssociation() throws Exception
View Full Code Here

    assertNotNull(followsModel.findMethod(ResourceMethod.BATCH_UPDATE));
    assertNotNull(followsModel.findMethod(ResourceMethod.BATCH_PARTIAL_UPDATE));

    assertNull(followsModel.findMethod(ResourceMethod.DELETE));
    assertNull(followsModel.findMethod(ResourceMethod.CREATE));
    assertNull(followsModel.findMethod(ResourceMethod.BATCH_CREATE));
  }

  @Test
  public void testInvalidSingleAssociation() throws Exception
  {
View Full Code Here

    assertHasMethods(model, crudMethods);

    for (ResourceMethod method : crudMethods)
    {
      ResourceMethodDescriptor descriptor = model.findMethod(method);
      List<Parameter<?>> params = descriptor.getParameters();
      boolean foundIntParam = false;
      boolean foundStringParam = false;
      for (Parameter<?> param : params)
      {
View Full Code Here

    final ResourceModel resourceModel = buildResourceModel(ExceptionsResource.class);
    assertEquals(resourceModel.getResourceType(), ResourceType.COLLECTION);

    assertEquals(resourceModel.getResourceMethodDescriptors().size(), 2);

    final ResourceMethodDescriptor getMethod = resourceModel.findMethod(ResourceMethod.GET);
    assertNotNull(getMethod);

    final ResourceMethodDescriptor actionMethod = resourceModel.findActionMethod("exception", ResourceLevel.COLLECTION);
    assertNotNull(actionMethod);
    final Class<?> returnClass = actionMethod.getActionReturnType();
View Full Code Here

                         "asyncDiscoveredItemId",
                         DiscoveredItem.class,
                         false,
                         AsyncDiscoveredItemsResource.class);

    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.GET));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.CREATE));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.DELETE));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.UPDATE));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.PARTIAL_UPDATE));
View Full Code Here

                         DiscoveredItem.class,
                         false,
                         AsyncDiscoveredItemsResource.class);

    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.GET));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.CREATE));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.DELETE));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.UPDATE));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.PARTIAL_UPDATE));

    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.BATCH_GET));
View Full Code Here

                         false,
                         AsyncDiscoveredItemsResource.class);

    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.GET));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.CREATE));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.DELETE));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.UPDATE));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.PARTIAL_UPDATE));

    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.BATCH_GET));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.BATCH_CREATE));
View Full Code Here

                         AsyncDiscoveredItemsResource.class);

    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.GET));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.CREATE));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.DELETE));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.UPDATE));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.PARTIAL_UPDATE));

    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.BATCH_GET));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.BATCH_CREATE));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.BATCH_UPDATE));
View Full Code Here

    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.GET));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.CREATE));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.DELETE));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.UPDATE));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.PARTIAL_UPDATE));

    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.BATCH_GET));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.BATCH_CREATE));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.BATCH_UPDATE));
    assertNotNull(asyncDiscoveredModel.findMethod(ResourceMethod.BATCH_PARTIAL_UPDATE));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.