Class TestSupportedEntitySearch


public class TestSupportedEntitySearch extends RepositoryConformanceTestCase
Test that all defined entities can be retrieved by property searches. This testcase covers Entity searches using basic and advanced search criteria/values. The difference is: basic = only literal values or repo helper regexes can be used for values of string match properties or as searchCriteria advanced = arbitrary regexes can be used for values of string match properties or as searchCriteria
  • Constructor Details

    • TestSupportedEntitySearch

      public TestSupportedEntitySearch(RepositoryConformanceWorkPad workPad, EntityDef entityDef)
      Typical constructor sets up superclass and discovered information needed for tests
      Parameters:
      workPad - place for parameters and results
      entityDef - type of valid entities
  • Method Details

    • run

      protected void run() throws Exception
      Default run method - throws Exception because this is a multi-phase testcase
      Specified by:
      run in class OpenMetadataTestCase
      Throws:
      Exception - something went wrong with the test.
    • run

      protected void run(OpenMetadataTestCase.TestPhase phase) throws Exception
      Method implemented by the actual test case. This overloads the default implementation in OpenMetadatatestCase
      Overrides:
      run in class OpenMetadataTestCase
      Parameters:
      phase - test phase
      Throws:
      Exception - something went wrong with the test.
    • getAllPropertiesForTypedef

      protected List<TypeDefAttribute> getAllPropertiesForTypedef(String userId, TypeDef typeDef)
      Return type def attributes for the properties defined in the TypeDef and all of its supertypes
      Parameters:
      userId - calling user
      typeDef - the definition of the type
      Returns:
      properties for an instance of this type
    • literaliseMatchProperties

      public InstanceProperties literaliseMatchProperties(String userId, TypeDef typeDef, InstanceProperties matchProperties)
      Method to find all the string values and literalise them for exact match. The InstanceProperties passed in should already have been populated with the desired test values.
    • literaliseStringProperty

      public String literaliseStringProperty(String value)
      Method to literalise a string value for exact match.
    • literaliseStringPropertyExact

      public String literaliseStringPropertyExact(String value)
      Method to literalise a string value for exact match.
    • literaliseStringPropertyStartsWith

      public String literaliseStringPropertyStartsWith(String value)
      Method to literalise a string value for prefix match.
    • literaliseStringPropertyEndsWith

      public String literaliseStringPropertyEndsWith(String value)
      Method to literalise a string value for suffix match.
    • literaliseStringPropertyContains

      public String literaliseStringPropertyContains(String value)
      Method to literalise a string value for suffix match.