Class ResetConfigurationHandlerTestBuilder


  • public class ResetConfigurationHandlerTestBuilder
    extends com.snowflake.connectors.application.configuration.reset.ResetConfigurationHandlerBuilder
    Test builder for the ResetConfigurationHandler.

    Allows for customization of the following handler components:

    • ResetConfigurationValidator
    • ResetConfigurationSdkCallback
    • ResetConfigurationCallback
    • ConnectorErrorHelper
    • ConnectorStatusService
    • ConfigurationRepository
    • PrerequisitesRepository
    • TransactionManager
    • Constructor Detail

      • ResetConfigurationHandlerTestBuilder

        public ResetConfigurationHandlerTestBuilder()
        Creates a new, empty ResetConfigurationHandlerTestBuilder.

        Properties of the new builder instance must be fully customized before a handler instance can be built.

      • ResetConfigurationHandlerTestBuilder

        public ResetConfigurationHandlerTestBuilder​(Session session)
        Creates a new ResetConfigurationHandlerTestBuilder.

        The properties of this builder are initialised with:

        • a default implementation of ResetConfigurationValidator
        • a default implementation of ResetConfigurationSdkCallback
        • a default implementation of ResetConfigurationCallback
        • ConnectorErrorHelper built using buildDefault
        • a default implementation of ConnectorStatusService
        Parameters:
        session - Snowpark session object
        Throws:
        NullPointerException - if the provided session object is null
    • Method Detail

      • withValidator

        public ResetConfigurationHandlerTestBuilder withValidator​(com.snowflake.connectors.application.configuration.reset.ResetConfigurationValidator validator)
        Sets the validator used to build the handler instance.
        Overrides:
        withValidator in class com.snowflake.connectors.application.configuration.reset.ResetConfigurationHandlerBuilder
        Parameters:
        validator - connector state validator
        Returns:
        this builder
      • withSdkCallback

        public ResetConfigurationHandlerTestBuilder withSdkCallback​(com.snowflake.connectors.application.configuration.reset.ResetConfigurationSdkCallback sdkCallback)
        Sets the callback used to build the handler instance.
        Parameters:
        sdkCallback - pre reset configuration callback
        Returns:
        this builder
      • withCallback

        public ResetConfigurationHandlerTestBuilder withCallback​(com.snowflake.connectors.application.configuration.reset.ResetConfigurationCallback callback)
        Sets the callback used to build the handler instance.
        Overrides:
        withCallback in class com.snowflake.connectors.application.configuration.reset.ResetConfigurationHandlerBuilder
        Parameters:
        callback - reset configuration callback
        Returns:
        this builder
      • withErrorHelper

        public ResetConfigurationHandlerTestBuilder withErrorHelper​(com.snowflake.connectors.common.exception.helper.ConnectorErrorHelper errorHelper)
        Sets the error helper used to build the handler instance.
        Overrides:
        withErrorHelper in class com.snowflake.connectors.application.configuration.reset.ResetConfigurationHandlerBuilder
        Parameters:
        errorHelper - connector error helper
        Returns:
        this builder
      • withConnectorStatusService

        public ResetConfigurationHandlerTestBuilder withConnectorStatusService​(com.snowflake.connectors.application.status.ConnectorStatusService connectorStatusService)
        Sets the connector status service used to build the handler instance.
        Parameters:
        connectorStatusService - connector status service
        Returns:
        this builder