Class TestSupportHolder

    • Method Detail

      • setContext

        public static void setContext​(io.dropwizard.testing.DropwizardTestSupport<?> support,
                                      @Nullable
                                      TestClientFactory clientFactory)
        Used to register a context support object. Intended to be used ONLY by guicey.
        Parameters:
        support - context support object
        clientFactory - custom factory object for ClientSupport (may be null for default factory usage)
        Throws:
        java.lang.IllegalStateException - if any support object already bound in thread
      • setContext

        public static void setContext​(io.dropwizard.testing.DropwizardTestSupport<?> support,
                                      @Nullable
                                      ClientSupport client)
        Used to register a context support object. Intended to be used ONLY by guicey.
        Parameters:
        support - context support object
        client - client support instance (from junit 5 extension context; null to create new client)
        Throws:
        java.lang.IllegalStateException - if any support object already bound in thread
      • isContextSet

        public static boolean isContextSet()
        Returns:
        true if the support object is bound in thread, false otherwise
      • getClient

        public static ClientSupport getClient()
        Returns:
        context test web client (in case of junit extensions would be the same client as in extenion)
      • reset

        public static void reset()