Package ratpack.test

Class MainClassApplicationUnderTest

    • Constructor Detail

      • MainClassApplicationUnderTest

        public MainClassApplicationUnderTest​(java.lang.Class<?> mainClass)
        Creates a new app under test, based on the given main class.
        Parameters:
        mainClass - a class who's main method starts a Ratpack server
    • Method Detail

      • createServer

        protected ratpack.server.RatpackServer createServer()
                                                     throws java.lang.Exception
        Starts the Ratpack server by invoking the public static void main(String[]) method of the “main class” backing this object.
        Specified by:
        createServer in class ServerBackedApplicationUnderTest
        Returns:
        the Ratpack server created by the main method
        Throws:
        java.lang.Exception - if the main method cannot be invoked