org.jcoderz.commons
Class ServerTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.jcoderz.commons.TestCase
              extended by org.jcoderz.commons.ServerTestCase
All Implemented Interfaces:
Test
Direct Known Subclasses:
DbUtilServerTest, FsConnectionServerTest, HttpConnectorServerTest

public class ServerTestCase
extends TestCase

Test cases which subclasses this class will be run inside an ejb server vm, without transaction. Just implement subclasses as any other tests.

Author:
Michael Griffel

Constructor Summary
ServerTestCase()
           
 
Method Summary
protected  CommonsTestRunnerSessionInterface createTestSession()
          Returns a connection to the test runner session bean.
static String getTestServletUrl(String path, String optionalParams)
           
static File getWeblogicDomainDir()
          Returns the path to the web logic domains directory.
 void runBare()
          Overrides runbare to run this test in the ejb server.
 void runBareAtServer()
          Runs this test case at the server by calling TestCase's run.
 
Methods inherited from class org.jcoderz.commons.TestCase
getBaseDir, getHostName, getSuite, hasTestCases
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runTest, setName, setUp, tearDown, 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, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerTestCase

public ServerTestCase()
Method Detail

getWeblogicDomainDir

public static File getWeblogicDomainDir()
Returns the path to the web logic domains directory.

Returns:
the path to the web logic domains directory.

runBare

public void runBare()
             throws Throwable
Overrides runbare to run this test in the ejb server.

Overrides:
runBare in class TestCase
Throws:
Throwable - if any exception is thrown

runBareAtServer

public void runBareAtServer()
                     throws Throwable
Runs this test case at the server by calling TestCase's run.

Throws:
Throwable - if any exception is thrown

getTestServletUrl

public static String getTestServletUrl(String path,
                                       String optionalParams)
                                throws Exception
Throws:
Exception

createTestSession

protected CommonsTestRunnerSessionInterface createTestSession()
                                                       throws NamingException,
                                                              CreateException,
                                                              RemoteException
Returns a connection to the test runner session bean.

Returns:
a connection to the test runner session bean.
Throws:
NamingException - when the lookup to the CommonsTestRunnerSession bean fails.
CreateException - when the creation of the bean fail.s
RemoteException - when a remote connection problem occurs.


Copyright 2007 The jCoderZ Project.