org.tynamo.test
Class AbstractContainerTest

java.lang.Object
  extended by org.tynamo.test.AbstractContainerTest
Direct Known Subclasses:
FunctionalTest

public abstract class AbstractContainerTest
extends Object


Nested Class Summary
static class AbstractContainerTest.PauseableServer
           
 
Field Summary
protected static String BASEURI
           
protected static int port
           
protected static AbstractContainerTest.PauseableServer server
           
protected  com.gargoylesoftware.htmlunit.WebClient webClient
           
 
Constructor Summary
AbstractContainerTest()
           
 
Method Summary
protected  void assertErrorTextNotPresent(com.gargoylesoftware.htmlunit.html.HtmlPage page)
           
protected  void assertErrorTextPresent(com.gargoylesoftware.htmlunit.html.HtmlPage page)
           
protected  void assertXPathNotPresent(com.gargoylesoftware.htmlunit.html.HtmlPage page, String xpath)
          Verifies that the specified xpath does NOT appear anywhere on the page.
protected  void assertXPathPresent(com.gargoylesoftware.htmlunit.html.HtmlPage page, String xpath)
          Verifies that the specified xpath is somewhere on the page.
 org.mortbay.jetty.webapp.WebAppContext buildContext()
          Non-abstract hook method (with a default implementation) to allow subclasses to provide their own WebAppContext instance.
protected  com.gargoylesoftware.htmlunit.html.HtmlPage clickButton(com.gargoylesoftware.htmlunit.html.HtmlForm form, String buttonValue)
           
protected  com.gargoylesoftware.htmlunit.html.HtmlPage clickButton(com.gargoylesoftware.htmlunit.html.HtmlPage page, String buttonId)
           
protected  com.gargoylesoftware.htmlunit.html.HtmlPage clickLink(com.gargoylesoftware.htmlunit.html.HtmlPage page, String linkText)
           
 void configureWebClient()
          Hook method which is called during setup phase, before the first request.
 void pauseServer(boolean paused)
           
 void startContainer()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

server

protected static AbstractContainerTest.PauseableServer server

port

protected static final int port
See Also:
Constant Field Values

BASEURI

protected static final String BASEURI
See Also:
Constant Field Values

webClient

protected final com.gargoylesoftware.htmlunit.WebClient webClient
Constructor Detail

AbstractContainerTest

public AbstractContainerTest()
Method Detail

startContainer

public void startContainer()
                    throws Exception
Throws:
Exception

buildContext

public org.mortbay.jetty.webapp.WebAppContext buildContext()
Non-abstract hook method (with a default implementation) to allow subclasses to provide their own WebAppContext instance.

Returns:
a WebAppContext

configureWebClient

public void configureWebClient()
Hook method which is called during setup phase, before the first request. It allows subclasses to modify the webClient, such as for disabling javascript


pauseServer

public void pauseServer(boolean paused)

assertXPathPresent

protected void assertXPathPresent(com.gargoylesoftware.htmlunit.html.HtmlPage page,
                                  String xpath)
Verifies that the specified xpath is somewhere on the page.

Parameters:
page -
xpath -

assertXPathNotPresent

protected void assertXPathNotPresent(com.gargoylesoftware.htmlunit.html.HtmlPage page,
                                     String xpath)
Verifies that the specified xpath does NOT appear anywhere on the page.

Parameters:
page -
xpath -

clickLink

protected com.gargoylesoftware.htmlunit.html.HtmlPage clickLink(com.gargoylesoftware.htmlunit.html.HtmlPage page,
                                                                String linkText)

clickButton

protected com.gargoylesoftware.htmlunit.html.HtmlPage clickButton(com.gargoylesoftware.htmlunit.html.HtmlPage page,
                                                                  String buttonId)
                                                           throws IOException
Throws:
IOException

clickButton

protected com.gargoylesoftware.htmlunit.html.HtmlPage clickButton(com.gargoylesoftware.htmlunit.html.HtmlForm form,
                                                                  String buttonValue)
                                                           throws IOException
Throws:
IOException

assertErrorTextPresent

protected void assertErrorTextPresent(com.gargoylesoftware.htmlunit.html.HtmlPage page)

assertErrorTextNotPresent

protected void assertErrorTextNotPresent(com.gargoylesoftware.htmlunit.html.HtmlPage page)


Copyright © 2004-2010. All Rights Reserved.