openfuture.bugbase.test.bugreports
Class ClientAddBugReportTestCase

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

public class ClientAddBugReportTestCase
extends BusinessTestCase

Tests adding new bug reports.

Created: Sun Nov 18 17:05:10 2001

Version:
$Revision: 1.2 $
Author:
Wolfgang Reissenberger

Fields inherited from class junit.log4j.LoggedTestCase
category, isLog4jInClasspath
 
Constructor Summary
ClientAddBugReportTestCase(java.lang.String name)
          Creates a new ClientAddBugReportTestCase instance.
 
Method Summary
protected  void addAndRemove(BugReport report)
          Loggs in as normal user, adds the given bug report, loggs in as admin user and removes it again.
protected  void missingAttributeTest(BugReport report, java.lang.String reasonKey)
          Test adding a bug report with a missing attribute.
 void testAddCompleteBugReport()
          Add a complete bug report created by BusinessTestCase.createCompleteBugReport(String).
 void testMissingDescription()
          Add a bug report created by BusinessTestCase.createCompleteBugReport(String).
 void testMissingErrorLevel()
          Add a bug report created by BusinessTestCase.createCompleteBugReport(String).
 void testMissingGroupid()
          Add a bug report created by BusinessTestCase.createCompleteBugReport(String).
 void testMissingPackage()
          Add a bug report created by BusinessTestCase.createCompleteBugReport(String).
 void testMissingTitle()
          Add a bug report created by BusinessTestCase.createCompleteBugReport(String).
 
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, tearDown
 
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

ClientAddBugReportTestCase

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

testAddCompleteBugReport

public void testAddCompleteBugReport()
                              throws java.lang.Exception
Add a complete bug report created by BusinessTestCase.createCompleteBugReport(String).
Throws:
java.lang.Exception - if an error occurs

testMissingTitle

public void testMissingTitle()
                      throws java.lang.Exception
Add a bug report created by BusinessTestCase.createCompleteBugReport(String). The title is set to null.
Throws:
java.lang.Exception - if an error occurs

testMissingDescription

public void testMissingDescription()
                            throws java.lang.Exception
Add a bug report created by BusinessTestCase.createCompleteBugReport(String). The description is set to null.
Throws:
java.lang.Exception - if an error occurs

testMissingErrorLevel

public void testMissingErrorLevel()
                           throws java.lang.Exception
Add a bug report created by BusinessTestCase.createCompleteBugReport(String). The error level is set to null.
Throws:
java.lang.Exception - if an error occurs

testMissingPackage

public void testMissingPackage()
                        throws java.lang.Exception
Add a bug report created by BusinessTestCase.createCompleteBugReport(String). The package name is set to null.
Throws:
java.lang.Exception - if an error occurs

testMissingGroupid

public void testMissingGroupid()
                        throws java.lang.Exception
Add a bug report created by BusinessTestCase.createCompleteBugReport(String). The group ID is set to null.
Throws:
java.lang.Exception - if an error occurs

missingAttributeTest

protected void missingAttributeTest(BugReport report,
                                    java.lang.String reasonKey)
                             throws java.lang.Exception
Test adding a bug report with a missing attribute.
Parameters:
report - incomplete bug report
reasonKey - expected key in the exception reasons
Throws:
java.lang.Exception - if an error occurs
See Also:
BusinessTestCase

addAndRemove

protected void addAndRemove(BugReport report)
                     throws java.lang.Exception
Loggs in as normal user, adds the given bug report, loggs in as admin user and removes it again.
Parameters:
report - the bug report to be added
Throws:
java.lang.Exception - if an error occurs


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