Class ConnectorTest

    • Field Detail

      • connectorTester

        protected ConnectorTester connectorTester
        Connector tester instance available to all tests. Implementation of predefined test classes is preferred over direct interaction with the tester.
      • testContext

        protected ConnectorTestContext testContext
        This serves as both the OperationContext and BrowseContext for all tests. Any properties, etc. needed in either context for a test can be added here. The setup method will reset the context prior to each test.
    • Constructor Detail

      • ConnectorTest

        public ConnectorTest()
    • Method Detail

      • clearObjectDefinitionCache

        public static void clearObjectDefinitionCache()
        Setup method for connector test classes

        This method will clear the definitionCache. By default, it is executed prior to running any tests in a test class but can be called before each test if individual tests require the object definitions to be rebuilt.

      • setupConnectorTester

        public final void setupConnectorTester()
        Setup method for all connector tests

        Initializes the tester and connector with the context provided by the implementing class

      • browseTypes

        protected final ObjectTypes browseTypes​(OperationType operationType)
        Helper method to get the available types for an operation

        This exists in the base class instead of BrowserTest for operation tests that require browsing

        Parameters:
        operationType - the operation to browse
        Returns:
        ObjectTypes instance representing the objects available for the selected operation
      • browseProfile

        protected final ObjectDefinitions browseProfile​(String objectTypeId,
                                                        OperationType operationType)
        Helper method to get the object definitions for an operation and object type

        This exists in the base class instead of BrowserTest for operation tests that require browsing. This method caches object definitions to avoid unnecessary lookups. The cache is cleared for each test class. If individual tests in a test class require a new call, then clearObjectDefinitionCache() should be called prior to the test to guarantee it.

        Parameters:
        objectTypeId - object type id for the requested definitions
        operationType - operation type for the requested definitions
        Returns:
        ObjectDefinitions instance representing the profile for the selected object and operation
      • getConnectorTestContext

        protected abstract ConnectorTestContext getConnectorTestContext()
        Abstract method that allows subclasses to specify the context and connector class for their tests
        Returns:
        ConnectorTestContext instance defined by the implementing class