Package ratpack.test

Class MainClassApplicationUnderTest

    • Constructor Detail

      • MainClassApplicationUnderTest

        public MainClassApplicationUnderTest​(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 RatpackServer createServer()
                                      throws 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:
        Exception - if the main method cannot be invoked