openfuture.bugbase.test.bugreports
Class ViewBugReportsTestCase

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

public class ViewBugReportsTestCase
extends BusinessTestCase

Testing searching and viewing existing bug reports. It is especially tested, whether read access to bug reports are blocked, if the user does not belong to the report's group.

Created: Mon Dec 03 19:29:24 2001

Version:
$Revision: 1.1 $
Author:
Wolfgang Reissenberger

Field Summary
protected  java.lang.Integer adminReportID
           
protected  java.lang.String adminReportTitle
           
protected  java.lang.Integer normalReportID
           
protected  java.lang.String normalReportTitle
           
protected  java.lang.String project
           
 
Fields inherited from class junit.log4j.LoggedTestCase
category, isLog4jInClasspath
 
Constructor Summary
ViewBugReportsTestCase(java.lang.String name)
          Creates a new ViewBugReportsTestCase instance.
 
Method Summary
 void setUp()
          First calls super.setUp() and creates two bug reports, one as normal user and one as admin user.
 void tearDown()
          Removes the created bug reports and finally calls super.tearDown().
 void testClientAccessDenied()
          Client Test: Try to access as normal user the bug report created by the admin user during setUp().
 void testClientAccessSuccessful()
          Client Test: Try to access as normal user the bug report created by the normal user during setUp().
 void testJspAccessDenied()
          JSP Test: Try to access as normal user the bug report created by the admin user during setUp().
 void testJspAccessSuccessful()
          JSP Test: Try to access as normal user the bug report created by the normal user during setUp().
 
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
 
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
 

Field Detail

normalReportID

protected java.lang.Integer normalReportID

adminReportID

protected java.lang.Integer adminReportID

normalReportTitle

protected java.lang.String normalReportTitle

adminReportTitle

protected java.lang.String adminReportTitle

project

protected java.lang.String project
Constructor Detail

ViewBugReportsTestCase

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

setUp

public void setUp()
           throws java.lang.Exception
First calls super.setUp() and creates two bug reports, one as normal user and one as admin user.
Overrides:
setUp in class BusinessTestCase
Throws:
java.lang.Exception - if an error occurs

tearDown

public void tearDown()
              throws java.lang.Exception
Removes the created bug reports and finally calls super.tearDown().
Overrides:
tearDown in class BusinessTestCase
Throws:
java.lang.Exception - if an error occurs
See Also:
setUp()

testClientAccessSuccessful

public void testClientAccessSuccessful()
                                throws java.lang.Exception
Client Test: Try to access as normal user the bug report created by the normal user during setUp(). This access should succeed.
Throws:
java.lang.Exception - if an error occurs

testClientAccessDenied

public void testClientAccessDenied()
                            throws java.lang.Exception
Client Test: Try to access as normal user the bug report created by the admin user during setUp(). This access is expected to fail.
Throws:
java.lang.Exception - if an error occurs

testJspAccessSuccessful

public void testJspAccessSuccessful()
                             throws java.lang.Exception
JSP Test: Try to access as normal user the bug report created by the normal user during setUp(). This access should succeed.
Throws:
java.lang.Exception - if an error occurs

testJspAccessDenied

public void testJspAccessDenied()
                         throws java.lang.Exception
JSP Test: Try to access as normal user the bug report created by the admin user during setUp(). This access is expected to fail.
Throws:
java.lang.Exception - if an error occurs


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