|
||||||||
| 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.opencms.test.OpenCmsTestCase
org.opencms.db.TestUrlNameMapping
public class TestUrlNameMapping
Tests the URL name mapping facilities of OpenCms.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.opencms.test.OpenCmsTestCase |
|---|
OpenCmsTestCase.ConnectionData |
| Field Summary |
|---|
| Fields inherited from class org.opencms.test.OpenCmsTestCase |
|---|
ARTICLE_TYPEID, DB_MYSQL, DB_ORACLE, m_additionalConnection, m_configuration, m_currentResourceStrorage, m_defaultConnection, m_defaultTablespace, m_indexTablespace, m_resourceStorages, m_setupConnection, m_tempTablespace |
| Constructor Summary | |
|---|---|
TestUrlNameMapping(String arg0)
Test constructor. |
|
| Method Summary | |
|---|---|
protected String |
addMapping(String name,
CmsResource res)
Helper method for adding a resource mapping. |
CmsResource |
createFile()
Creates a new file and returns it. |
protected void |
delete(CmsResource res)
Helper method for deleting a resource. |
CmsObject |
getOnlineCmsObject()
Helper method for getting a CMS context set to the Online project. |
protected void |
publish()
Helper method for publishing the current project. |
static junit.framework.Test |
suite()
Returns the test suite. |
void |
testDeleteChanged()
Tests that when a not-new resource is deleted and published, its URL name mappings are also deleted. |
void |
testDeleteNew()
Tests that when a new resource is deleted, its URL name mapping is also deleted. |
void |
testMultipleIdMapping()
Tests mapping the same URL name to multiple ids. |
void |
testMultipleNameMapping()
Tests mapping multiple names to the same resource. |
void |
testOverwrite()
Tests that an URL name that has not been published will be overwritten by a new URL name. |
void |
testPublish()
Tests publishing the URL name mappings of a resource. |
void |
testSimpleMapping()
Tests adding a single url name in the Offline project. |
void |
testUndo()
Tests that when the changes of a resource are undone, its unpublished URL name mapping will be removed. |
protected void |
touch(CmsResource res)
Changes a resource's "last modified" time to the current time. |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, 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 TestUrlNameMapping(String arg0)
arg0 - | Method Detail |
|---|
public static junit.framework.Test suite()
public CmsResource createFile()
throws Exception
Exception - if something goes wrong
public CmsObject getOnlineCmsObject()
throws Exception
CmsObject with the project set to the Online project
Exception - if something goes wrong
public void testDeleteChanged()
throws Exception
Exception - if something goes wrong
public void testDeleteNew()
throws Exception
Exception - if something goes wrong
public void testMultipleIdMapping()
throws Exception
Exception - if something goes wrong
public void testMultipleNameMapping()
throws Exception
Exception - if something goes wrong
public void testOverwrite()
throws Exception
Exception - if something goes wrong
public void testPublish()
throws Exception
Exception - if something goes wrong
public void testSimpleMapping()
throws Exception
Exception - if something goes wrong
public void testUndo()
throws Exception
Exception - if something goes wrong
protected String addMapping(String name,
CmsResource res)
throws Exception
name - the mapping name to be usedres - the resource to which the
Exception
protected void delete(CmsResource res)
throws Exception
res - the resource to delete
Exception - if something goes wrong
protected void publish()
throws Exception
Exception
protected void touch(CmsResource res)
throws Exception
res - the resource which should be touched
Exception - if something goes wrong
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||