|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.framework.Assert | +--junit.framework.TestCase | +--junit.log4j.LoggedTestCase | +--openfuture.bugbase.test.common.BusinessTestCase | +--openfuture.bugbase.test.bugreports.ViewBugReportsTestCase | +--openfuture.bugbase.test.bugreports.EditBugReportTestCase
Test the editing of existing bug reports. We test two general tasks:
description
and title
.Access control
: Users may not edit any
bug reports unless they belong to the "doctors" group.
Fields inherited from class openfuture.bugbase.test.bugreports.ViewBugReportsTestCase |
adminReportID, adminReportTitle, normalReportID, normalReportTitle, project |
Fields inherited from class junit.log4j.LoggedTestCase |
category, isLog4jInClasspath |
Constructor Summary | |
EditBugReportTestCase(java.lang.String name)
Creates a new EditBugReportTestCase instance. |
Method Summary | |
protected com.meterware.httpunit.WebForm |
editReport(com.meterware.httpunit.WebConversation wc)
Edit the report as doctor user created during
set up as normal user:
Log in as doctor user and call
getBugReport.do? |
static junit.framework.Test |
suite()
Define the test suite of the current class. |
void |
testJspEditAccessDenied()
Try to edit the report as normal user
created during set up as normal user. |
void |
testJspEditDescription()
Edit the bug report created as normal user
during set up and modify its
description .
|
void |
testJspEditTitle()
Edit the bug report created as normal user
during set up and modify its
title .
|
Methods inherited from class openfuture.bugbase.test.bugreports.ViewBugReportsTestCase |
setUp, tearDown, testClientAccessDenied, testClientAccessSuccessful, testJspAccessDenied, testJspAccessSuccessful |
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 |
Constructor Detail |
public EditBugReportTestCase(java.lang.String name)
EditBugReportTestCase
instance.name
- test case nameMethod Detail |
public static junit.framework.Test suite()
public void testJspEditDescription() throws java.lang.Exception
normal user
during set up
and modify its
description
.
The bug report is retrieved afterwards and checked, if the
modification was successful.java.lang.Exception
- if an error occurspublic void testJspEditTitle() throws java.lang.Exception
normal user
during set up
and modify its
title
.
The bug report is retrieved afterwards and checked, if the
modification was successful.java.lang.Exception
- if an error occurspublic void testJspEditAccessDenied() throws java.lang.Exception
normal user
created during set up
as normal user. This should
fail.java.lang.Exception
- if an error occursprotected com.meterware.httpunit.WebForm editReport(com.meterware.httpunit.WebConversation wc) throws java.lang.Exception
doctor user
created during
set up
as normal user:
doctor user
and call
getBugReport.do?action=edit&id=<
normalReportID
>
recognized
by the form action which must contain the substring
"updateBugReport.do".wc
- the HttpUnit Web Conversation objectnormalReportID
.java.lang.Exception
- if an error occurs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |