Class AssetManagerTestBase
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.assetmanager.fvt.common.AssetManagerTestBase
-
- Direct Known Subclasses:
ClientConstructorTest,CreateGlossaryTest,ManageExternalIdsTest
public class AssetManagerTestBase extends Object
AssetManagerTestBase provides common functions for test cases.
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringGLOSSARY_TYPE_NAMEprotected static intmaxPageSize
-
Constructor Summary
Constructors Constructor Description AssetManagerTestBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetAssetManager(String assetManagerName, String serverName, String serverPlatformRootURL, String userId, AuditLog auditLog, String testCaseName)Create a asset manager entity and return its GUID.protected ExternalAssetManagerClientgetAssetManagerClient(String serverName, String serverPlatformRootURL, AuditLog auditLog, String testCaseName)Create and return a asset manager client.protected StringgetGlossary(GlossaryExchangeClient client, String testCaseName, String activityName, String userId, String assetManagerGUID, String assetManagerName, String glossaryName, String glossaryDisplayName, String glossaryDescription, String glossaryUsage, String glossaryLanguage, String glossaryExternalIdentifier, String glossaryExternalIdentifierName, String glossaryExternalIdentifierUsage, String glossaryExternalIdentifierSource, KeyPattern glossaryExternalIdentifierKeyPattern, Map<String,String> mappingProperties)Create a new glossary object.protected GlossaryExchangeClientgetGlossaryExchangeClient(String serverName, String serverPlatformRootURL, AuditLog auditLog, String testCaseName)Create and return a glossary exchange client.protected voidvalidateCorrelationHeader(List<MetadataCorrelationHeader> metadataCorrelationHeaders, String testCaseName, String activityName, String assetManagerGUID, String assetManagerName, String glossaryExternalIdentifier, String glossaryExternalIdentifierName, String glossaryExternalIdentifierUsage, String glossaryExternalIdentifierSource, KeyPattern glossaryExternalIdentifierKeyPattern, Map<String,String> mappingProperties, int expectedNumberOfIdentifiers)protected voidvalidateElementHeader(ElementHeader elementHeader, String testCaseName, String activityName, String guid, String typeName)protected voidvalidateGlossaryProperties(GlossaryProperties glossaryProperties, String testCaseName, String activityName, String glossaryName, String glossaryDisplayName, String glossaryDescription, String glossaryUsage, String glossaryLanguage)
-
-
-
Field Detail
-
maxPageSize
protected static final int maxPageSize
- See Also:
- Constant Field Values
-
GLOSSARY_TYPE_NAME
protected static final String GLOSSARY_TYPE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAssetManagerClient
protected ExternalAssetManagerClient getAssetManagerClient(String serverName, String serverPlatformRootURL, AuditLog auditLog, String testCaseName) throws FVTUnexpectedCondition
Create and return a asset manager client.- Parameters:
serverName- name of the server to connect toserverPlatformRootURL- the network address of the server running the OMAS REST serversauditLog- logging destinationtestCaseName- name of calling test case- Returns:
- client
- Throws:
FVTUnexpectedCondition- the test case failed
-
getGlossaryExchangeClient
protected GlossaryExchangeClient getGlossaryExchangeClient(String serverName, String serverPlatformRootURL, AuditLog auditLog, String testCaseName) throws FVTUnexpectedCondition
Create and return a glossary exchange client.- Parameters:
serverName- name of the server to connect toserverPlatformRootURL- the network address of the server running the OMAS REST serversauditLog- logging destinationtestCaseName- name of calling test case- Returns:
- client
- Throws:
FVTUnexpectedCondition- the test case failed
-
getAssetManager
protected String getAssetManager(String assetManagerName, String serverName, String serverPlatformRootURL, String userId, AuditLog auditLog, String testCaseName) throws FVTUnexpectedCondition
Create a asset manager entity and return its GUID.- Parameters:
assetManagerName- name of asset manager to useserverName- name of the server to connect toserverPlatformRootURL- the network address of the server running the OMAS REST serversuserId- calling userauditLog- logging destinationtestCaseName- name of calling test case- Returns:
- unique identifier of the asset manager entity
- Throws:
FVTUnexpectedCondition- the test case failed
-
validateCorrelationHeader
protected void validateCorrelationHeader(List<MetadataCorrelationHeader> metadataCorrelationHeaders, String testCaseName, String activityName, String assetManagerGUID, String assetManagerName, String glossaryExternalIdentifier, String glossaryExternalIdentifierName, String glossaryExternalIdentifierUsage, String glossaryExternalIdentifierSource, KeyPattern glossaryExternalIdentifierKeyPattern, Map<String,String> mappingProperties, int expectedNumberOfIdentifiers) throws FVTUnexpectedCondition
- Throws:
FVTUnexpectedCondition
-
validateElementHeader
protected void validateElementHeader(ElementHeader elementHeader, String testCaseName, String activityName, String guid, String typeName) throws FVTUnexpectedCondition
- Throws:
FVTUnexpectedCondition
-
validateGlossaryProperties
protected void validateGlossaryProperties(GlossaryProperties glossaryProperties, String testCaseName, String activityName, String glossaryName, String glossaryDisplayName, String glossaryDescription, String glossaryUsage, String glossaryLanguage) throws FVTUnexpectedCondition
- Throws:
FVTUnexpectedCondition
-
getGlossary
protected String getGlossary(GlossaryExchangeClient client, String testCaseName, String activityName, String userId, String assetManagerGUID, String assetManagerName, String glossaryName, String glossaryDisplayName, String glossaryDescription, String glossaryUsage, String glossaryLanguage, String glossaryExternalIdentifier, String glossaryExternalIdentifierName, String glossaryExternalIdentifierUsage, String glossaryExternalIdentifierSource, KeyPattern glossaryExternalIdentifierKeyPattern, Map<String,String> mappingProperties) throws FVTUnexpectedCondition
Create a new glossary object. The identifier may be null. The glossary is retrieved and the return values tested to be sure the new element was created correctly.- Parameters:
client- glossary clienttestCaseName- calling test caseactivityName- calling activity within the test caseuserId- calling userassetManagerGUID- unique identifier of asset manager to associate the identifier withassetManagerName- unique name of asset manager to associate the identifier withglossaryName- qualified name of glossaryglossaryDisplayName- display name for glossaryglossaryDescription- description of glossaryglossaryUsage- expected usage of the glossaryglossaryLanguage- language used in the glossaryglossaryExternalIdentifier- external identifier used in third party technologyglossaryExternalIdentifierName- name of external identifier used in third party technologyglossaryExternalIdentifierUsage- usage of external identifier used in third party technologyglossaryExternalIdentifierSource- source of external identifier used in third party technologyglossaryExternalIdentifierKeyPattern- key pattern for external identifier used in third party technologymappingProperties- additional mapping properties for external identifier used in third party technology- Returns:
- unique identifier of the new glossary
- Throws:
FVTUnexpectedCondition- error
-
-