openfuture.bugbase.test.access
Class NewUserTestCase

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--junit.log4j.LoggedTestCase
                    |
                    +--openfuture.bugbase.test.common.BusinessTestCase
                          |
                          +--openfuture.bugbase.test.access.NewUserTestCase
All Implemented Interfaces:
junit.framework.Test

public class NewUserTestCase
extends BusinessTestCase

Test case adding a new user to Bug Base.

Created: Sun Oct 28 20:10:57 2001

Version:
$Revision: 1.1 $
Author:
Wolfgang Reissenberger

Fields inherited from class junit.log4j.LoggedTestCase
category, isLog4jInClasspath
 
Constructor Summary
NewUserTestCase(java.lang.String name)
          Creates a new NewUserTestCase instance.
 
Method Summary
 void addNewUser()
          Create a unique user with initial user ID "testid", add it to the list of test users and try to save it to Bug Base.
 java.util.LinkedList getTestuserIDs()
          Return the list of test users' IDs
 java.util.LinkedList getTestusers()
          Get the value of testusers.
 void setTestusers(java.util.LinkedList v)
          Set the value of testusers.
 void tearDown()
          Remove the user added in testAddNewUserAsNormal(), testAddNewUserAsDoctor() and testAddNewUserAsDoctor().
 void testAddNewUserAsAdmin()
          Try to add a new user: Login as admin user. Try to add a new user. If this causes a I18NException, everything is OK.
 void testAddNewUserAsDoctor()
          Try to add a new user: Login as doctor user. Try to add a new user. If this causes a I18NException, everything is OK.
 void testAddNewUserAsNormal()
          Try to add a new user: Login as normal user. Try to add a new user. If this causes a I18NException, everything is OK.
 
Methods inherited from class openfuture.bugbase.test.common.BusinessTestCase
callPage, createAdminUser, createCompleteBugReport, createCompleteBugReport, createDoctorUser, createNormalUser, createNormalUser, createUniqueUserId, fillReportForm, findForm, findLink, findLinkByText, getAdminUser, getClient, getDoctorUser, getNormalUser, getResourceBundle, getUniqueFilename, hasReasonKey, isUniqueUserId, login, login, loginPage, loginPage, logoff, logoffPage, searchUser, setAdminUser, setClient, setDefault, setDoctorUser, setNormalUser, setResourceBundle, setUp
 
Methods inherited from class junit.log4j.LoggedTestCase
debug, debug, error, error, fatal, fatal, getProperties, info, info, setProperties, 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
 

Constructor Detail

NewUserTestCase

public NewUserTestCase(java.lang.String name)
Creates a new NewUserTestCase instance.
Parameters:
name - test case name
Method Detail

testAddNewUserAsNormal

public void testAddNewUserAsNormal()
                            throws java.lang.Exception
Try to add a new user:
Throws:
java.lang.Exception - if an error occurs

testAddNewUserAsDoctor

public void testAddNewUserAsDoctor()
                            throws java.lang.Exception
Try to add a new user:
Throws:
java.lang.Exception - if an error occurs

testAddNewUserAsAdmin

public void testAddNewUserAsAdmin()
                           throws java.lang.Exception
Try to add a new user:
Throws:
java.lang.Exception - if an error occurs

addNewUser

public void addNewUser()
                throws java.lang.Exception
Create a unique user with initial user ID "testid", add it to the list of test users and try to save it to Bug Base.
Throws:
java.lang.Exception - if an error occurs

tearDown

public void tearDown()
              throws java.lang.Exception
Remove the user added in testAddNewUserAsNormal(), testAddNewUserAsDoctor() and testAddNewUserAsDoctor().
Overrides:
tearDown in class BusinessTestCase
Throws:
java.lang.Exception - if an error occurs

getTestusers

public java.util.LinkedList getTestusers()
Get the value of testusers. Lazily instantiated.
Returns:
value of testusers.

setTestusers

public void setTestusers(java.util.LinkedList v)
Set the value of testusers.
Parameters:
v - Value to assign to testusers.

getTestuserIDs

public java.util.LinkedList getTestuserIDs()
Return the list of test users' IDs
Returns:
list of user IDs


Copyright © 2000 -- 2003 openfuture.de. All Rights Reserved.