rewrite-test-harness 2.0.0.Alpha3

org.ocpsoft.rewrite.test
Class RewriteTestBase

java.lang.Object
  extended by org.ocpsoft.rewrite.test.RewriteTestBase
Direct Known Subclasses:
RewriteTest

public abstract class RewriteTestBase
extends Object

Base utility class for Rewrite Tests.

Author:
Lincoln Baxter, III

Constructor Summary
RewriteTestBase()
           
 
Method Summary
protected static void assertContains(String text, String s)
          Verifies that the given text contains the given string.
protected  HttpAction<org.apache.http.client.methods.HttpGet> get(org.apache.http.client.HttpClient client, String path)
          Request a resource from the deployed test-application.
protected  HttpAction<org.apache.http.client.methods.HttpGet> get(org.apache.http.client.HttpClient client, String path, org.apache.http.Header... headers)
          Request a resource from the deployed test-application.
protected  HttpAction<org.apache.http.client.methods.HttpGet> get(String path)
          Request a resource from the deployed test-application.
protected  String getBaseURL()
           
protected  String getContextPath()
           
protected  HtmlAction getWebClient(String path)
           
protected  HttpAction<org.apache.http.client.methods.HttpHead> head(String path)
          Request a resource from the deployed test-application.
protected static Collection<org.jboss.shrinkwrap.api.GenericArchive> resolveDependencies(String coords)
          Resolve an Archive from Maven coordinates.
protected static org.jboss.shrinkwrap.api.GenericArchive resolveDependency(String coords)
          Resolve an Archive from Maven coordinates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RewriteTestBase

public RewriteTestBase()
Method Detail

resolveDependencies

protected static Collection<org.jboss.shrinkwrap.api.GenericArchive> resolveDependencies(String coords)
Resolve an Archive from Maven coordinates.


resolveDependency

protected static org.jboss.shrinkwrap.api.GenericArchive resolveDependency(String coords)
Resolve an Archive from Maven coordinates.


get

protected HttpAction<org.apache.http.client.methods.HttpGet> get(String path)
                                                          throws Exception
Request a resource from the deployed test-application. The HttpServletRequest.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<org.apache.http.client.methods.HttpGet> get(org.apache.http.client.HttpClient client,
                                                                 String path)
                                                          throws Exception
Request a resource from the deployed test-application. The HttpServletRequest.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<org.apache.http.client.methods.HttpGet> get(org.apache.http.client.HttpClient client,
                                                                 String path,
                                                                 org.apache.http.Header... headers)
                                                          throws Exception
Request a resource from the deployed test-application. The HttpServletRequest.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

protected HttpAction<org.apache.http.client.methods.HttpHead> head(String path)
Request a resource from the deployed test-application. The HttpServletRequest.getContextPath() will be automatically prepended to the given path.

E.g: A path of '/example' will be sent as '/rewrite-test/example'


getBaseURL

protected String getBaseURL()

getContextPath

protected String getContextPath()

getWebClient

protected HtmlAction getWebClient(String path)
                           throws com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException,
                                  IOException
Throws:
com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException
IOException

assertContains

protected static void assertContains(String text,
                                     String s)
Verifies that the given text contains the given string.


rewrite-test-harness 2.0.0.Alpha3

Copyright © 2013 OCPsoft. All Rights Reserved.