|
||||||||
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.search.TestCmsSearch
public class TestCmsSearch
Unit test for the cms search indexer.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.opencms.test.OpenCmsTestCase |
---|
OpenCmsTestCase.ConnectionData |
Field Summary | |
---|---|
static String |
INDEX_OFFLINE
Name of the index used for testing. |
static String |
INDEX_TEST
Name of the search index created using API. |
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 | |
---|---|
TestCmsSearch(String arg0)
Default JUnit constructor. |
Method Summary | |
---|---|
static void |
printResults(List<CmsSearchResult> searchResult,
CmsObject cms)
Prints the given list of search results to STDOUT. |
static void |
printResults(List<CmsSearchResult> searchResult,
CmsObject cms,
boolean showExcerpt)
Prints the given list of search results to STDOUT. |
static junit.framework.Test |
suite()
Test suite for this test class. |
void |
testCmsSearchDocumentTypes()
Tests searching in various document types. |
void |
testCmsSearchIndexer()
Test the cms search indexer. |
void |
testCmsSearchLargeResult()
Tests the cms search with a larger result set. |
void |
testCmsSearchUppercaseFolderName()
Tests the CmsSearch with folder names with upper case letters. |
void |
testCmsSearchXmlContent()
Test the cms search indexer. |
void |
testIndexGeneration()
Tests index generation with different analyzers. |
void |
testQueryEncoding()
Tests if modifies
the query in an undesireable way (changes url encoded Strings). |
void |
testSearchIssueWithSpecialFoldernames()
Tests an issue where no results are found in folders that have names like /basisdienstleistungen_-_zka/ . |
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 |
Field Detail |
---|
public static final String INDEX_OFFLINE
public static final String INDEX_TEST
Constructor Detail |
---|
public TestCmsSearch(String arg0)
arg0
- JUnit parametersMethod Detail |
---|
public static junit.framework.Test suite()
public void testCmsSearchDocumentTypes() throws Throwable
Throwable
- if something goes wrongpublic void testCmsSearchIndexer() throws Throwable
Throwable
- if something goes wrongpublic void testCmsSearchLargeResult() throws Throwable
Throwable
- if something goes wrongpublic void testCmsSearchUppercaseFolderName() throws Exception
Exception
- in case the test failspublic void testCmsSearchXmlContent() throws Throwable
Throwable
- if something goes wrongpublic void testIndexGeneration() throws Throwable
This test was added in order to verify proper generation of resource "root path" information in the index.
Throwable
- if something goes wrongpublic void testQueryEncoding()
CmsSearch.setQuery(String)
modifies
the query in an undesireable way (changes url encoded Strings).
public void testSearchIssueWithSpecialFoldernames() throws Exception
/basisdienstleistungen_-_zka/
.
Exception
- if the test failspublic static void printResults(List<CmsSearchResult> searchResult, CmsObject cms)
searchResult
- the list to printcms
- the current OpenCms user contextpublic static void printResults(List<CmsSearchResult> searchResult, CmsObject cms, boolean showExcerpt)
searchResult
- the list to printcms
- the current OpenCms user contextshowExcerpt
- if true
, the generated excerpt is also displayed
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |