Class NonWorkingRequest


  • public final class NonWorkingRequest
    extends java.lang.Object
    Author:
    Simon Thoresen Hult
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Request newInstance​(java.lang.String uri, com.google.inject.Module... guiceModules)
      Factory method to create a Request without an associated Container.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • newInstance

        public static Request newInstance​(java.lang.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.