public class WebappTester
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.lang.String |
requestLocale |
Constructor and Description |
---|
WebappTester(BRJS brjs,
java.io.File filePathBase,
int defaultSocketTimeout,
int defaultConnectionTimeout) |
WebappTester(java.io.File filePathBase) |
Modifier and Type | Method and Description |
---|---|
WebappTester |
characterEncodingIs(java.lang.String characterEncoding) |
WebappTester |
contentLengthIs(int contentLength) |
WebappTester |
contentTypeIs(java.lang.String contentType) |
java.lang.String |
pollServerForStatusCode(java.lang.String url,
int requiredStatusCode) |
void |
pollServerUntilMatchesPredicate(java.lang.String url,
com.google.common.base.Predicate<java.lang.String> predicate) |
WebappTester |
printOutcome() |
WebappTester |
redirectUrlIs(java.lang.String redirectPath) |
WebappTester |
requestTimesOut(java.lang.String url) |
WebappTester |
responseContains(java.lang.String response) |
WebappTester |
responseDoesntContain(java.lang.String response) |
WebappTester |
responseIs(java.lang.String response) |
WebappTester |
responseIsConcatenationOfFiles(java.lang.String[] filePaths) |
WebappTester |
responseIsConcatenationOfFiles(java.lang.String[] filePaths,
java.lang.String delimiter) |
WebappTester |
responseIsContentsOfFile(java.lang.String filePath) |
WebappTester |
sameAsRequestFor(java.lang.String url) |
WebappTester |
statusCodeIs(int statusCode) |
WebappTester |
statusTextIs(java.lang.String statusText) |
void |
storeContentIn(java.lang.StringBuffer responseContent) |
WebappTester |
whenRequestMadeTo(java.lang.String url) |
WebappTester |
whenRequestMadeTo(java.lang.String url,
boolean followRedirects) |
WebappTester |
whenRequestMadeTo(java.lang.String url,
int socketTimeout,
int connectionTimeout,
boolean followRedirects,
java.io.OutputStream outputStream) |
WebappTester |
whenRequestMadeTo(java.lang.String url,
java.io.OutputStream outputStream) |
public WebappTester(BRJS brjs, java.io.File filePathBase, int defaultSocketTimeout, int defaultConnectionTimeout)
public WebappTester(java.io.File filePathBase)
public WebappTester whenRequestMadeTo(java.lang.String url, boolean followRedirects) throws org.apache.http.client.ClientProtocolException, java.io.IOException
org.apache.http.client.ClientProtocolException
java.io.IOException
public WebappTester whenRequestMadeTo(java.lang.String url) throws org.apache.http.client.ClientProtocolException, java.io.IOException
org.apache.http.client.ClientProtocolException
java.io.IOException
public WebappTester whenRequestMadeTo(java.lang.String url, java.io.OutputStream outputStream) throws org.apache.http.client.ClientProtocolException, java.io.IOException
org.apache.http.client.ClientProtocolException
java.io.IOException
public WebappTester whenRequestMadeTo(java.lang.String url, int socketTimeout, int connectionTimeout, boolean followRedirects, java.io.OutputStream outputStream) throws org.apache.http.client.ClientProtocolException, java.io.IOException
org.apache.http.client.ClientProtocolException
java.io.IOException
public WebappTester requestTimesOut(java.lang.String url) throws java.io.IOException
java.io.IOException
public java.lang.String pollServerForStatusCode(java.lang.String url, int requiredStatusCode) throws org.apache.http.client.ClientProtocolException, java.io.IOException, java.lang.InterruptedException
org.apache.http.client.ClientProtocolException
java.io.IOException
java.lang.InterruptedException
public void pollServerUntilMatchesPredicate(java.lang.String url, com.google.common.base.Predicate<java.lang.String> predicate) throws org.apache.http.client.ClientProtocolException, java.io.IOException, java.lang.InterruptedException
org.apache.http.client.ClientProtocolException
java.io.IOException
java.lang.InterruptedException
public WebappTester printOutcome()
public WebappTester statusCodeIs(int statusCode)
public WebappTester contentTypeIs(java.lang.String contentType)
public WebappTester contentLengthIs(int contentLength)
public WebappTester characterEncodingIs(java.lang.String characterEncoding)
public WebappTester responseIs(java.lang.String response)
public WebappTester statusTextIs(java.lang.String statusText)
public WebappTester responseContains(java.lang.String response)
public WebappTester responseDoesntContain(java.lang.String response)
public WebappTester redirectUrlIs(java.lang.String redirectPath)
public WebappTester responseIsContentsOfFile(java.lang.String filePath) throws java.io.IOException
java.io.IOException
public WebappTester responseIsConcatenationOfFiles(java.lang.String[] filePaths) throws java.io.IOException
java.io.IOException
public WebappTester responseIsConcatenationOfFiles(java.lang.String[] filePaths, java.lang.String delimiter) throws java.io.IOException
java.io.IOException
public WebappTester sameAsRequestFor(java.lang.String url) throws org.apache.http.client.ClientProtocolException, java.io.IOException
org.apache.http.client.ClientProtocolException
java.io.IOException
public void storeContentIn(java.lang.StringBuffer responseContent)