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

Examples of com.linkedin.restli.internal.server.model.ResourceType


    expectedTypes.put("com.linkedin.restli.examples.scala.client.scalaGreetings", ResourceType.COLLECTION);

    for (Map.Entry<String, ResourceSchema> entry: _schemas.getResources().entrySet())
    {
      final ResourceSchema schema = entry.getValue();
      final ResourceType actualType;
      if (schema.hasCollection())
      {
        actualType = ResourceType.COLLECTION;
      }
      else if (schema.hasAssociation())
      {
        actualType = ResourceType.ASSOCIATION;
      }
      else if (schema.hasSimple())
      {
        actualType = ResourceType.SIMPLE;
      }
      else
      {
        Assert.assertTrue(schema.hasActionsSet());
        actualType = ResourceType.ACTIONS;
      }

      final String schemaFullName = getResourceSchemaFullName(schema, entry.getKey());
      final ResourceType expectedType = expectedTypes.get(schemaFullName);
      Assert.assertNotNull(expectedType);
      Assert.assertSame(actualType, expectedType, schemaFullName);
    }
  }
View Full Code Here

TOP

Related Classes of com.linkedin.restli.internal.server.model.ResourceType

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.