Class TestSupportedEntitySearch
java.lang.Object
org.odpi.openmetadata.conformance.beans.OpenMetadataTestCase
org.odpi.openmetadata.conformance.tests.repository.RepositoryConformanceTestCase
org.odpi.openmetadata.conformance.tests.repository.instances.TestSupportedEntitySearch
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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.odpi.openmetadata.conformance.beans.OpenMetadataTestCase
OpenMetadataTestCase.TestPhase
-
Field Summary
Fields inherited from class org.odpi.openmetadata.conformance.tests.repository.RepositoryConformanceTestCase
cohortRepositoryConnector, repositoryConformanceWorkPad
Fields inherited from class org.odpi.openmetadata.conformance.beans.OpenMetadataTestCase
defaultProfileId, defaultRequirementId, discoveredProperties, exceptionBean, notSupportedAssertions, successfulAssertions, successMessage, testCaseDescriptionURL, unsuccessfulAssertions
-
Constructor Summary
ConstructorDescriptionTestSupportedEntitySearch
(RepositoryConformanceWorkPad workPad, EntityDef entityDef) Typical constructor sets up superclass and discovered information needed for tests -
Method Summary
Modifier and TypeMethodDescriptionprotected List<TypeDefAttribute>
getAllPropertiesForTypedef
(String userId, TypeDef typeDef) Return type def attributes for the properties defined in the TypeDef and all of its supertypesliteraliseMatchProperties
(String userId, TypeDef typeDef, InstanceProperties matchProperties) Method to find all the string values and literalise them for exact match.literaliseStringProperty
(String value) Method to literalise a string value for exact match.Method to literalise a string value for suffix match.Method to literalise a string value for suffix match.Method to literalise a string value for exact match.Method to literalise a string value for prefix match.protected void
run()
Default run method - throws Exception because this is a multi-phase testcaseprotected void
Method implemented by the actual test case.Methods inherited from class org.odpi.openmetadata.conformance.tests.repository.RepositoryConformanceTestCase
addEntityProxyToRepository, addEntityToRepository, buildExceptionMessage, generatePropertiesForInstance, getAllPropertiesForInstance, getAllUniquePropertiesForInstance, getEntityDef, getMaxSearchResults, getMetadataCollection, getMinPropertiesForInstance, getPropertiesForInstance, getPropertiesForTypeDef, getRepositoryConnector, incrementSuccessfulCount, incrementUnsuccessfulCount, logTestEnd, logTestStart, updateTestIdByType
Methods inherited from class org.odpi.openmetadata.conformance.beans.OpenMetadataTestCase
addDiscoveredProperty, addNotSupportedAssertion, assertCondition, assertCondition, assertObjectsAreEqual, cleanTest, cleanup, endAsynchronousTest, executeTest, executeTest, getResult, getSummary, getTestCaseDescriptionURL, getTestCaseId, getTestCaseName, isTestPassed, isTestRan, setSuccessMessage, startAsynchronousTest, toString, updateTestId, verifyCondition, verifyCondition, verifyObjectsAreEqual
-
Constructor Details
-
TestSupportedEntitySearch
Typical constructor sets up superclass and discovered information needed for tests- Parameters:
workPad
- place for parameters and resultsentityDef
- type of valid entities
-
-
Method Details
-
run
Default run method - throws Exception because this is a multi-phase testcase- Specified by:
run
in classOpenMetadataTestCase
- Throws:
Exception
- something went wrong with the test.
-
run
Method implemented by the actual test case. This overloads the default implementation in OpenMetadatatestCase- Overrides:
run
in classOpenMetadataTestCase
- Parameters:
phase
- test phase- Throws:
Exception
- something went wrong with the test.
-
getAllPropertiesForTypedef
Return type def attributes for the properties defined in the TypeDef and all of its supertypes- Parameters:
userId
- calling usertypeDef
- 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
Method to literalise a string value for exact match. -
literaliseStringPropertyExact
Method to literalise a string value for exact match. -
literaliseStringPropertyStartsWith
Method to literalise a string value for prefix match. -
literaliseStringPropertyEndsWith
Method to literalise a string value for suffix match. -
literaliseStringPropertyContains
Method to literalise a string value for suffix match.
-