|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.infoglue.cms.util.InfoGlueTestCase
public abstract class InfoGlueTestCase
The base class of all InfoGlue tests cases will setup the things that need to be setup in order to fake out certain services and facilities that may not be running in the environment that they expect. Things like this FakeServletContext can generally be gotten rid of with a few key refactorings of the system to not rely on being run as a web app, etc.
| Constructor Summary | |
|---|---|
InfoGlueTestCase()
|
|
| Method Summary | |
|---|---|
protected java.util.Date |
changeDate(java.util.Date current,
int unit,
int amount)
Changes from the given date the supplied unit by the provided amount |
protected java.util.Date |
changeDate(int unit,
int amount)
Changes from todays date the supplied unit by the provided amount |
protected static java.util.List |
createRole(java.lang.String name)
Creates a role with the given name to use for testing |
static InfoGluePrincipal |
getAdminPrincipal()
Returns the administrator principal |
static InfoGluePrincipal |
getAnonPrincipal()
Returns the anonymous principal |
static InfoGluePrincipal |
getCmsUserPrincipal()
Returns the cmsUser principal |
static java.lang.Integer |
getLanguageId()
Returns a Language Id. |
static java.lang.Integer |
getLanguageId(java.lang.Integer repoId)
Returns a Language Id for the given Repository. |
static java.lang.Integer |
getRepoId()
Returns a Repository Id to use for testing. |
static java.lang.Integer |
getSiteNodeId()
Returns a SiteNode id. |
static java.lang.Integer |
getSiteNodeId(java.lang.Integer repoId)
Returns a SiteNode id for the given Repository. |
static void |
initializeInfoGlue()
For testing we dont care about the nofitications that take place, especially notifications to remote servers and such that will fail under a normal slimmed down test environment. |
protected void |
setUp()
|
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, 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 InfoGlueTestCase()
| Method Detail |
|---|
protected void setUp()
throws java.lang.Exception
setUp in class junit.framework.TestCasejava.lang.Exception
public static void initializeInfoGlue()
throws SystemException
SystemException
protected java.util.Date changeDate(int unit,
int amount)
unit - A value from Calendaramount - the amount to change the unit, can be positive or negative
protected java.util.Date changeDate(java.util.Date current,
int unit,
int amount)
current - The date to changeunit - A value from Calendaramount - the amount to change the unit, can be positive or negative
protected static java.util.List createRole(java.lang.String name)
name - the name of the role
public static InfoGluePrincipal getAdminPrincipal()
public static InfoGluePrincipal getCmsUserPrincipal()
public static InfoGluePrincipal getAnonPrincipal()
public static java.lang.Integer getRepoId()
public static java.lang.Integer getLanguageId()
public static java.lang.Integer getLanguageId(java.lang.Integer repoId)
repoId - The id of the Repository to get the Master Language.
public static java.lang.Integer getSiteNodeId()
public static java.lang.Integer getSiteNodeId(java.lang.Integer repoId)
repoId - The id of the Repository to get the Master Language.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||