Package org.ocpsoft.rewrite.test
Class RewriteITBase
java.lang.Object
org.ocpsoft.rewrite.test.RewriteITBase
- Direct Known Subclasses:
RewriteIT
Base utility class for Rewrite Tests.
- Author:
- Lincoln Baxter, III
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidassertContains(String text, String s) Verifies that the given text contains the given string.protected HttpActionRequest a resource from the deployed test-application.protected HttpActionRequest a resource from the deployed test-application.protected HttpActionRequest a resource from the deployed test-application.protected Stringprotected Stringprotected HtmlActiongetWebClient(String path) protected HttpActionRequest a resource from the deployed test-application.protected static File[]resolveDependencies(String coords) Resolve anArchivefrom Maven coordinates.protected static FileresolveDependency(String coords) Resolve anArchivefrom Maven coordinates.
-
Field Details
-
client
protected final okhttp3.OkHttpClient client
-
-
Constructor Details
-
RewriteITBase
protected RewriteITBase()
-
-
Method Details
-
resolveDependencies
Resolve anArchivefrom Maven coordinates. -
resolveDependency
Resolve anArchivefrom Maven coordinates. -
get
Request a resource from the deployed test-application. TheHttpServletRequest.getContextPath()will be automatically prepended to the given path.E.g: A path of '/example' will be sent as '/rewrite-test/example'
- Throws:
Exception
-
get
Request a resource from the deployed test-application. TheHttpServletRequest.getContextPath()will be automatically prepended to the given path.E.g: A path of '/example' will be sent as '/rewrite-test/example'
- Throws:
Exception
-
get
protected HttpAction get(okhttp3.OkHttpClient client, String path, okhttp3.Headers headers) throws Exception Request a resource from the deployed test-application. TheHttpServletRequest.getContextPath()will be automatically prepended to the given path.E.g: A path of '/example' will be sent as '/rewrite-test/example'
- Throws:
Exception
-
head
Request a resource from the deployed test-application. TheHttpServletRequest.getContextPath()will be automatically prepended to the given path.E.g: A path of '/example' will be sent as '/rewrite-test/example'
-
getBaseURL
-
getContextPath
-
getWebClient
protected HtmlAction getWebClient(String path) throws com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException, IOException - Throws:
com.gargoylesoftware.htmlunit.FailingHttpStatusCodeExceptionIOException
-
assertContains
Verifies that the given text contains the given string.
-