Class NonWorkingRequest


  • public final class NonWorkingRequest
    extends Object
    Author:
    Simon Thoresen Hult
    • Method Detail

      • newInstance

        public static Request newInstance​(String uri,
                                          com.google.inject.Module... guiceModules)

        Factory method to create a Request without an associated Container. The design of jDISC does not allow this, so this method internally creates TestDriver, activates a Container, and creates a new Request from that Container. Before returning, this method closes the Request, and calls TestDriver.close() on the TestDriver. This means that you MUST NOT attempt to access any Container features through the created Request. This factory is only for directed feature tests that require a non-null Request.

        Parameters:
        uri - The URI string to assign to the Request.
        guiceModules - The guice modules to inject into the Application.
        Returns:
        A non-working Request.