Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

openfuture.bugbase.test.adduser
Class NewUserTestCase  view NewUserTestCase download NewUserTestCase.java

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byjunit.log4j.LoggedTestCase
              extended byopenfuture.bugbase.test.common.BusinessTestCase
                  extended byopenfuture.bugbase.test.common.LoginTestCase
                      extended byopenfuture.bugbase.test.adduser.NewUserTestCase
All Implemented Interfaces:
junit.framework.Test

public class NewUserTestCase
extends openfuture.bugbase.test.common.LoginTestCase

Test case adding a new user to Bug Base.

Created: Sun Oct 28 20:10:57 2001

Version:
$Revision: 1.2 $

Field Summary
private  java.util.LinkedList testusers
           
 
Fields inherited from class openfuture.bugbase.test.common.LoginTestCase
 
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
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 55 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() 55 , testAddNewUserAsDoctor() 55 and testAddNewUserAsDoctor() 55 .
 void testAddNewUserAsAdmin()
          Try to add a new user: Login as admin user. Try to add a new user. If this causes a BugBaseException, 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 BugBaseException, 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 BugBaseException, everything is OK.
 
Methods inherited from class openfuture.bugbase.test.common.LoginTestCase
createAdminUser, createDoctorUser, createNormalUser, createNormalUser, createUniqueUserId, getAdminUser, getDoctorUser, getNormalUser, isUniqueUserId, login, searchUser, setAdminUser, setDoctorUser, setNormalUser, setUp
 
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

testusers

private java.util.LinkedList testusers
Constructor Detail

NewUserTestCase

public NewUserTestCase(java.lang.String name)
Creates a new NewUserTestCase instance.

Method Detail

testAddNewUserAsNormal

public void testAddNewUserAsNormal()
                            throws java.lang.Exception
Try to add a new user:
  • Login as normal user.
  • Try to add a new user.
  • If this causes a BugBaseException, everything is OK. Otherwise an Exception is thrown, since only admin users may add users.


testAddNewUserAsDoctor

public void testAddNewUserAsDoctor()
                            throws java.lang.Exception
Try to add a new user:
  • Login as doctor user.
  • Try to add a new user.
  • If this causes a BugBaseException, everything is OK. Otherwise an Exception is thrown, since only admin users may add users.


testAddNewUserAsAdmin

public void testAddNewUserAsAdmin()
                           throws java.lang.Exception
Try to add a new user:
  • Login as admin user.
  • Try to add a new user.
  • If this causes a BugBaseException, everything is OK. Otherwise an Exception is thrown, since only admin users may add users.


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 55 and try to save it to Bug Base.


tearDown

public void tearDown()
              throws java.lang.Exception
Remove the user added in testAddNewUserAsNormal() 55 , testAddNewUserAsDoctor() 55 and testAddNewUserAsDoctor() 55 .


getTestusers

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


setTestusers

public void setTestusers(java.util.LinkedList v)
Set the value of testusers.


getTestuserIDs

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