org.jboss.portal.junit
Class AbstractTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.jboss.portal.junit.AbstractTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
DispatcherTestCase, PortletConfigTestCase, PortletModeTestCase, PreferencesSpecTestCase, PreferencesTestCase, RenderResponseTestCase

public class AbstractTestCase
extends junit.framework.TestCase

Base case for client side test case.


Constructor Summary
AbstractTestCase(java.lang.String s)
           
 
Method Summary
static void check(Result result, int expected)
           
 ClientSession createSession()
           
protected  void deploy(java.lang.String appName)
          Deploy a portlet application.
static Result doGet(ClientSession session, Result result, java.lang.String componentName)
           
protected  org.apache.commons.httpclient.HttpClient getClient()
           
protected  org.apache.commons.httpclient.HostConfiguration getHost()
           
protected  org.jboss.jmx.adaptor.rmi.RMIAdaptor getRMIAdaptor()
           
protected  void setUp()
           
static Result start(ClientSession session, java.lang.String componentName)
           
protected  void tearDown()
           
protected  void undeploy()
          Undeploy a portlet application.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractTestCase

public AbstractTestCase(java.lang.String s)
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

getClient

protected final org.apache.commons.httpclient.HttpClient getClient()

getHost

protected final org.apache.commons.httpclient.HostConfiguration getHost()

getRMIAdaptor

protected final org.jboss.jmx.adaptor.rmi.RMIAdaptor getRMIAdaptor()
                                                            throws java.lang.Exception
Throws:
java.lang.Exception

deploy

protected final void deploy(java.lang.String appName)
                     throws java.lang.Exception
Deploy a portlet application. This method blocks until the deployment is finished.

Throws:
java.lang.Exception

undeploy

protected final void undeploy()
                       throws java.lang.Exception
Undeploy a portlet application. This method blocks until the undeployment is finished.

Throws:
java.lang.Exception

createSession

public ClientSession createSession()

start

public static Result start(ClientSession session,
                           java.lang.String componentName)
                    throws java.lang.Throwable
Throws:
java.lang.Throwable

doGet

public static Result doGet(ClientSession session,
                           Result result,
                           java.lang.String componentName)
                    throws java.lang.Throwable
Throws:
java.lang.Throwable

check

public static void check(Result result,
                         int expected)
                  throws java.lang.Throwable
Throws:
java.lang.Throwable