Package com.yahoo.jdisc.test
Class NonWorkingRequest
java.lang.Object
com.yahoo.jdisc.test.NonWorkingRequest
- Author:
- Simon Thoresen Hult
-
Method Summary
Modifier and TypeMethodDescriptionstatic Request
newInstance
(String uri, com.google.inject.Module... guiceModules)
-
Method Details
-
newInstance
Factory method to create a
Request
without an associatedContainer
. 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 methodcloses
the Request, and callsTestDriver.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 theApplication
.- Returns:
- A non-working Request.
-