|
|||||||||
Home >> All >> openfuture >> bugbase >> test >> [ common overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
openfuture.bugbase.test.common
Class LoginTestCase

java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
junit.log4j.LoggedTestCase
openfuture.bugbase.test.common.BusinessTestCase
openfuture.bugbase.test.common.LoginTestCase
- All Implemented Interfaces:
- junit.framework.Test
- public class LoginTestCase
- extends BusinessTestCase
Test to login into Bug Base.
Created: Sun Oct 28 19:52:33 2001
- Version:
- $Revision: 1.2 $
Field Summary | |
private openfuture.bugbase.domain.User |
adminUser
|
private openfuture.bugbase.domain.User |
doctorUser
|
private openfuture.bugbase.domain.User |
normalUser
|
Fields inherited from class openfuture.bugbase.test.common.BusinessTestCase |
|
Fields inherited from class junit.log4j.LoggedTestCase |
category, isLog4jInClasspath |
Fields inherited from class junit.framework.TestCase |
|
Constructor Summary | |
LoginTestCase(java.lang.String name)
Creates a new LoginTestCase instance. |
Method Summary | |
static openfuture.bugbase.domain.User |
createAdminUser(java.util.LinkedList users)
Create a new user with password "test". |
static openfuture.bugbase.domain.User |
createDoctorUser(java.util.LinkedList users)
Create a new user with password "test". |
static openfuture.bugbase.domain.User |
createNormalUser(java.util.LinkedList users)
Create a unique normal user with initial name "test_user" 55 . |
static openfuture.bugbase.domain.User |
createNormalUser(java.lang.String userid,
java.util.LinkedList users)
Create a new user with password "test". |
static java.lang.String |
createUniqueUserId(java.lang.String initial,
java.util.LinkedList users)
Create a unique user ID |
openfuture.bugbase.domain.User |
getAdminUser()
Get the value of adminUser. |
openfuture.bugbase.domain.User |
getDoctorUser()
Get the value of doctorUser. |
openfuture.bugbase.domain.User |
getNormalUser()
Get the value of normalUser. |
static boolean |
isUniqueUserId(java.lang.String userid,
java.util.LinkedList users)
Check, if the list of users contains a user with user ID userid . |
openfuture.bugbase.domain.User |
login(java.lang.String userid,
java.lang.String password)
Tries to establish a new connection to Bug Base. |
static openfuture.bugbase.domain.User |
searchUser(java.lang.String userid,
java.util.LinkedList users)
Search the user in the list with the given user ID. |
void |
setAdminUser(openfuture.bugbase.domain.User v)
Set the value of adminUser. |
void |
setDoctorUser(openfuture.bugbase.domain.User v)
Set the value of doctorUser. |
void |
setNormalUser(openfuture.bugbase.domain.User v)
Set the value of normalUser. |
void |
setUp()
Set up the test case: Call BusinessTestCase.setUp() 55 . Login as "admin" with password "bugbase". Create a unique new user 55 with password "test". |
void |
tearDown()
Remove the test users from Bug Base. |
Methods inherited from class openfuture.bugbase.test.common.BusinessTestCase |
getClient, getServletUrl, setClient, setServletUrl |
Methods inherited from class junit.log4j.LoggedTestCase |
debug, debug, error, error, fatal, fatal, info, info, warn, warn |
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 |
Field Detail |
normalUser
private openfuture.bugbase.domain.User normalUser
doctorUser
private openfuture.bugbase.domain.User doctorUser
adminUser
private openfuture.bugbase.domain.User adminUser
Constructor Detail |
LoginTestCase
public LoginTestCase(java.lang.String name)
- Creates a new
LoginTestCase
instance.
Method Detail |
setUp
public void setUp() throws java.lang.Exception
- Set up the test case:
- Call BusinessTestCase.setUp() 55 .
- Login as "admin" with password "bugbase".
- Create a unique new user 55 with password "test". This user belongs only to the group "users".
- Create a unique new user 55 with password "test". This user belongs to the groups "users" and "doctors".
- Create a unique new user 55 with password "test". This user belongs to the groups "users", "doctors" and "admin".
- Save these users to Bug Base.
- Overrides:
setUp
in classBusinessTestCase
tearDown
public void tearDown() throws java.lang.Exception
- Remove the test users from Bug Base.
createNormalUser
public static openfuture.bugbase.domain.User createNormalUser(java.lang.String userid, java.util.LinkedList users)
- Create a new user with password "test". This user belongs only to
the group "users".
createNormalUser
public static openfuture.bugbase.domain.User createNormalUser(java.util.LinkedList users)
- Create a unique normal user
with initial name "test_user" 55 .
createDoctorUser
public static openfuture.bugbase.domain.User createDoctorUser(java.util.LinkedList users)
- Create a new user with password "test". This user belongs to
the groups "users" and "doctors". The initial user ID
is "test_doctor".
createAdminUser
public static openfuture.bugbase.domain.User createAdminUser(java.util.LinkedList users)
- Create a new user with password "test". This user belongs to
the groups "users", "doctors" and "admin". The initial user ID
is "test_admin".
login
public openfuture.bugbase.domain.User login(java.lang.String userid, java.lang.String password) throws openfuture.bugbase.error.BugBaseException
- Tries to establish a new connection to Bug Base.
searchUser
public static openfuture.bugbase.domain.User searchUser(java.lang.String userid, java.util.LinkedList users)
- Search the user in the list with the given user ID.
createUniqueUserId
public static java.lang.String createUniqueUserId(java.lang.String initial, java.util.LinkedList users)
- Create a unique user ID
isUniqueUserId
public static boolean isUniqueUserId(java.lang.String userid, java.util.LinkedList users)
- Check, if the list of users contains a user with
user ID
userid
.
getNormalUser
public openfuture.bugbase.domain.User getNormalUser()
- Get the value of normalUser.
setNormalUser
public void setNormalUser(openfuture.bugbase.domain.User v)
- Set the value of normalUser.
getDoctorUser
public openfuture.bugbase.domain.User getDoctorUser()
- Get the value of doctorUser.
setDoctorUser
public void setDoctorUser(openfuture.bugbase.domain.User v)
- Set the value of doctorUser.
getAdminUser
public openfuture.bugbase.domain.User getAdminUser()
- Get the value of adminUser.
setAdminUser
public void setAdminUser(openfuture.bugbase.domain.User v)
- Set the value of adminUser.
|
|||||||||
Home >> All >> openfuture >> bugbase >> test >> [ common overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |