|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.framework.Assert | +--junit.framework.TestCase | +--de.kosi.servertest.ServerTestCase
ServerTestCase implements an abstract superclass for all tests, that
require a running server. The server is operating on a testdatabase, that
is created every time a test is run. The database contains 4 regular
accounts : 'kosi1' - 'kosi4' and one administrator account 'system'.
Classes extending this class have to implement the method public Test
suite()
. The implementation should be
return suite(
. This is because it is not
possible to find out the class, suite()
has been invoked in.
ChangeLog:
$Log: ServerTestCase.java,v $ Revision 1.3 2001/06/12 17:14:33 jiriki - Reimplemented DistributedList to make filters working - Made ServertestCase working. Revision 1.2 2001/06/04 14:21:10 jiriki Made source more comliant to coding guidelines. Revision 1.1.1.1 2001/04/29 18:05:19 jiriki Imported sources from zola. Revision 1.2 2001/04/19 19:01:26 wombat Removed Bugs Revision 1.1 2001/04/19 18:51:28 wombat - updated junit (new Version: 3.6) - implemented ServerTestCase - Added license files
Constructor Summary | |
ServerTestCase(java.lang.String name)
Create a new ServerTestCase. |
Method Summary | |
void |
doAsUser(UserImpl user,
java.lang.Runnable task)
Execute a piece of code, as if it was invoked by a user. |
static UserImpl[] |
getAdminUsers()
Return an array containing the admin Users. |
static UserImpl[] |
getUsers()
Return an array containing the regular Users. |
static void |
init()
Initialize the test environment. |
void |
loginUser(UserImpl user)
|
void |
loginUser(UserImpl user,
FoyerListener listener)
|
void |
logoutUser(UserImpl user)
|
static void |
shutdown()
Shut down the test environment. |
static junit.framework.Test |
suite()
This method is only implemented, to ensure, that every class extending this class averrides this method. |
static junit.framework.Test |
suite(java.lang.Class testClass)
This method returns a test suit for the given testclass. |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, name, run, run, runBare, runTest, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, fail, fail |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ServerTestCase(java.lang.String name)
name
- Name of the test.Method Detail |
public static void init()
public static UserImpl[] getUsers()
public static UserImpl[] getAdminUsers()
public void loginUser(UserImpl user) throws java.rmi.RemoteException, KosiAccessException
public void loginUser(UserImpl user, FoyerListener listener) throws java.rmi.RemoteException, KosiAccessException
public void logoutUser(UserImpl user)
public void doAsUser(UserImpl user, java.lang.Runnable task)
user
- User the code is invoked for.task
- Code to execute.public static void shutdown() throws java.io.IOException
java.io.IOException
- If loading the configuration values fails.public static junit.framework.Test suite() throws java.lang.Exception
suite(.class)
.java.lang.Exception
- To stop testcases that do not override this method.public static junit.framework.Test suite(java.lang.Class testClass) throws java.lang.Exception
testClass
- ServerTestCase, this method is called from.java.lang.Exception
- If creating the TestSuit fails.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |