Class CreateSchedulerHandlerTestBuilder


  • public class CreateSchedulerHandlerTestBuilder
    extends com.snowflake.connectors.application.scheduler.CreateSchedulerHandlerBuilder
    Test builder for the CreateResourceHandler.

    Allows for customization of the following handler components:

    • ConnectorErrorHelper
    • SchedulerCreator
    • Constructor Detail

      • CreateSchedulerHandlerTestBuilder

        public CreateSchedulerHandlerTestBuilder()
        Creates a new, empty CreateSchedulerHandlerTestBuilder.

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

      • CreateSchedulerHandlerTestBuilder

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

        The properties of this builder are initialised with:

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

      • withErrorHelper

        public CreateSchedulerHandlerTestBuilder 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.scheduler.CreateSchedulerHandlerBuilder
        Parameters:
        errorHelper - connector error helper
        Returns:
        this builder
      • withSchedulerCreator

        public CreateSchedulerHandlerTestBuilder withSchedulerCreator​(com.snowflake.connectors.application.scheduler.SchedulerCreator schedulerCreator)
        Sets the scheduler creator used to build the handler instance.
        Parameters:
        schedulerCreator - scheduler creator
        Returns:
        this builder