com.liferay.portal.search.test
Class BaseSearchTestCase
java.lang.Object
com.liferay.portal.search.test.BaseSearchTestCase
public abstract class BaseSearchTestCase
- extends Object
|
Method Summary |
protected void |
addAttachment(ClassedModel classedModel)
|
protected BaseModel<?> |
addBaseModel(BaseModel<?> parentBaseModel,
boolean approved,
String keywords,
ServiceContext serviceContext)
|
protected BaseModel<?> |
addBaseModelWithDDMStructure(BaseModel<?> parentBaseModel,
String keywords,
ServiceContext serviceContext)
|
protected BaseModel<?> |
addBaseModelWithWorkflow(BaseModel<?> parentBaseModel,
boolean approved,
Map<Locale,String> keywordsMap,
ServiceContext serviceContext)
|
protected abstract BaseModel<?> |
addBaseModelWithWorkflow(BaseModel<?> parentBaseModel,
boolean approved,
String keywords,
ServiceContext serviceContext)
|
protected void |
addComment(ClassedModel classedModel,
String body,
ServiceContext serviceContext)
|
protected void |
assertBaseModelsCount(int expectedCount,
SearchContext searchContext)
|
protected void |
assertBaseModelsCount(int expectedCount,
String keywords,
SearchContext searchContext)
|
protected void |
assertGroupEntriesCount(long expectedCount)
|
protected void |
assertGroupEntriesCount(long expectedCount,
long userId)
|
protected void |
assertGroupEntriesCount(long expectedCount,
User user)
|
protected void |
deleteBaseModel(BaseModel<?> baseModel)
|
protected void |
deleteBaseModel(long primaryKey)
|
protected void |
expireBaseModelVersions(BaseModel<?> baseModel,
boolean expireAllVersions,
ServiceContext serviceContext)
|
protected abstract Class<?> |
getBaseModelClass()
|
protected String |
getBaseModelClassName()
|
protected Long |
getBaseModelClassPK(ClassedModel classedModel)
|
protected String |
getDDMStructureFieldName()
|
protected BaseModel<?> |
getParentBaseModel(BaseModel<?> parentBaseModel,
ServiceContext serviceContext)
|
protected BaseModel<?> |
getParentBaseModel(Group group,
ServiceContext serviceContext)
|
protected String |
getParentBaseModelClassName()
|
protected abstract String |
getSearchKeywords()
|
protected boolean |
isCheckBaseModelPermission()
|
protected boolean |
isExpirableAllVersions()
|
protected void |
moveBaseModelToTrash(long primaryKey)
|
protected void |
moveParentBaseModelToTrash(long primaryKey)
|
protected void |
searchAttachments()
|
protected void |
searchBaseModel()
|
protected void |
searchBaseModel(int initialBaseModelsSearchCount)
|
protected int |
searchBaseModelsCount(Class<?> clazz,
long groupId,
SearchContext searchContext)
|
protected int |
searchBaseModelsCount(SearchContext searchContext)
|
protected void |
searchBaseModelWithDelete()
|
protected void |
searchBaseModelWithDelete(int initialBaseModelsSearchCount)
|
protected void |
searchBaseModelWithTrash()
|
protected void |
searchBaseModelWithTrash(int initialBaseModelsSearchCount)
|
protected void |
searchBaseModelWithUpdate()
|
protected void |
searchByDDMStructureField()
|
protected void |
searchByKeywords()
|
protected void |
searchByKeywordsInsideParentBaseModel()
|
protected void |
searchByMixedPhraseKeywords()
|
protected void |
searchComments()
|
protected void |
searchExpireVersions(boolean expireAllVersions)
|
protected long |
searchGroupEntriesCount(long groupId,
long userId)
|
protected void |
searchMyEntries()
|
protected void |
searchRecentEntries()
|
protected void |
searchStatus()
|
protected void |
searchVersions()
|
protected void |
searchWithinDDMStructure()
|
void |
setUp()
|
void |
testBaseModelUserPermissions()
|
void |
testLocalizedSearch()
|
void |
testParentBaseModelUserPermissions()
|
void |
testSearchAttachments()
|
void |
testSearchBaseModel()
|
void |
testSearchBaseModelWithDelete()
|
void |
testSearchBaseModelWithTrash()
|
void |
testSearchBaseModelWithUpdate()
|
void |
testSearchByDDMStructureField()
|
void |
testSearchByKeywords()
|
void |
testSearchByKeywordsInsideParentBaseModel()
|
void |
testSearchComments()
|
void |
testSearchExpireAllVersions()
|
void |
testSearchExpireLatestVersion()
|
void |
testSearchMixedPhraseKeywords()
|
void |
testSearchMyEntries()
|
void |
testSearchRecentEntries()
|
void |
testSearchStatus()
|
void |
testSearchVersions()
|
void |
testSearchWithinDDMStructure()
|
protected void |
testUserPermissions(boolean addBaseModelPermission,
boolean addParentBaseModelPermission)
|
protected BaseModel<?> |
updateBaseModel(BaseModel<?> baseModel,
String keywords,
ServiceContext serviceContext)
|
protected void |
updateDDMStructure(ServiceContext serviceContext)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CHECK_BASE_MODEL_PERMISSION
protected final boolean CHECK_BASE_MODEL_PERMISSION
- See Also:
- Constant Field Values
baseModel
protected BaseModel<?> baseModel
group
@DeleteAfterTestRun
protected Group group
BaseSearchTestCase
public BaseSearchTestCase()
setUp
public void setUp()
throws Exception
- Throws:
Exception
testBaseModelUserPermissions
public void testBaseModelUserPermissions()
throws Exception
- Throws:
Exception
testLocalizedSearch
public void testLocalizedSearch()
throws Exception
- Throws:
Exception
testParentBaseModelUserPermissions
public void testParentBaseModelUserPermissions()
throws Exception
- Throws:
Exception
testSearchAttachments
public void testSearchAttachments()
throws Exception
- Throws:
Exception
testSearchBaseModel
public void testSearchBaseModel()
throws Exception
- Throws:
Exception
testSearchBaseModelWithDelete
public void testSearchBaseModelWithDelete()
throws Exception
- Throws:
Exception
testSearchBaseModelWithTrash
public void testSearchBaseModelWithTrash()
throws Exception
- Throws:
Exception
testSearchBaseModelWithUpdate
public void testSearchBaseModelWithUpdate()
throws Exception
- Throws:
Exception
testSearchByDDMStructureField
public void testSearchByDDMStructureField()
throws Exception
- Throws:
Exception
testSearchByKeywords
public void testSearchByKeywords()
throws Exception
- Throws:
Exception
testSearchByKeywordsInsideParentBaseModel
public void testSearchByKeywordsInsideParentBaseModel()
throws Exception
- Throws:
Exception
testSearchComments
public void testSearchComments()
throws Exception
- Throws:
Exception
testSearchExpireAllVersions
public void testSearchExpireAllVersions()
throws Exception
- Throws:
Exception
testSearchExpireLatestVersion
public void testSearchExpireLatestVersion()
throws Exception
- Throws:
Exception
testSearchMixedPhraseKeywords
public void testSearchMixedPhraseKeywords()
throws Exception
- Throws:
Exception
testSearchMyEntries
public void testSearchMyEntries()
throws Exception
- Throws:
Exception
testSearchRecentEntries
public void testSearchRecentEntries()
throws Exception
- Throws:
Exception
testSearchStatus
public void testSearchStatus()
throws Exception
- Throws:
Exception
testSearchVersions
public void testSearchVersions()
throws Exception
- Throws:
Exception
testSearchWithinDDMStructure
public void testSearchWithinDDMStructure()
throws Exception
- Throws:
Exception
addAttachment
protected void addAttachment(ClassedModel classedModel)
throws Exception
- Throws:
Exception
addBaseModel
protected BaseModel<?> addBaseModel(BaseModel<?> parentBaseModel,
boolean approved,
String keywords,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
addBaseModelWithDDMStructure
protected BaseModel<?> addBaseModelWithDDMStructure(BaseModel<?> parentBaseModel,
String keywords,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
addBaseModelWithWorkflow
protected BaseModel<?> addBaseModelWithWorkflow(BaseModel<?> parentBaseModel,
boolean approved,
Map<Locale,String> keywordsMap,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
addBaseModelWithWorkflow
protected abstract BaseModel<?> addBaseModelWithWorkflow(BaseModel<?> parentBaseModel,
boolean approved,
String keywords,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
addComment
protected void addComment(ClassedModel classedModel,
String body,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
assertBaseModelsCount
protected void assertBaseModelsCount(int expectedCount,
SearchContext searchContext)
throws Exception
- Throws:
Exception
assertBaseModelsCount
protected void assertBaseModelsCount(int expectedCount,
String keywords,
SearchContext searchContext)
throws Exception
- Throws:
Exception
assertGroupEntriesCount
protected void assertGroupEntriesCount(long expectedCount)
throws Exception
- Throws:
Exception
assertGroupEntriesCount
protected void assertGroupEntriesCount(long expectedCount,
long userId)
throws Exception
- Throws:
Exception
assertGroupEntriesCount
protected void assertGroupEntriesCount(long expectedCount,
User user)
throws Exception
- Throws:
Exception
deleteBaseModel
protected void deleteBaseModel(BaseModel<?> baseModel)
throws Exception
- Throws:
Exception
deleteBaseModel
protected void deleteBaseModel(long primaryKey)
throws Exception
- Throws:
Exception
expireBaseModelVersions
protected void expireBaseModelVersions(BaseModel<?> baseModel,
boolean expireAllVersions,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
getBaseModelClass
protected abstract Class<?> getBaseModelClass()
getBaseModelClassName
protected String getBaseModelClassName()
getBaseModelClassPK
protected Long getBaseModelClassPK(ClassedModel classedModel)
getDDMStructureFieldName
protected String getDDMStructureFieldName()
getParentBaseModel
protected BaseModel<?> getParentBaseModel(BaseModel<?> parentBaseModel,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
getParentBaseModel
protected BaseModel<?> getParentBaseModel(Group group,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
getParentBaseModelClassName
protected String getParentBaseModelClassName()
getSearchKeywords
protected abstract String getSearchKeywords()
isCheckBaseModelPermission
protected boolean isCheckBaseModelPermission()
isExpirableAllVersions
protected boolean isExpirableAllVersions()
moveBaseModelToTrash
protected void moveBaseModelToTrash(long primaryKey)
throws Exception
- Throws:
Exception
moveParentBaseModelToTrash
protected void moveParentBaseModelToTrash(long primaryKey)
throws Exception
- Throws:
Exception
searchAttachments
protected void searchAttachments()
throws Exception
- Throws:
Exception
searchBaseModel
protected void searchBaseModel()
throws Exception
- Throws:
Exception
searchBaseModel
protected void searchBaseModel(int initialBaseModelsSearchCount)
throws Exception
- Throws:
Exception
searchBaseModelsCount
protected int searchBaseModelsCount(Class<?> clazz,
long groupId,
SearchContext searchContext)
throws Exception
- Throws:
Exception
searchBaseModelsCount
protected int searchBaseModelsCount(SearchContext searchContext)
throws Exception
- Throws:
Exception
searchBaseModelWithDelete
protected void searchBaseModelWithDelete()
throws Exception
- Throws:
Exception
searchBaseModelWithDelete
protected void searchBaseModelWithDelete(int initialBaseModelsSearchCount)
throws Exception
- Throws:
Exception
searchBaseModelWithTrash
protected void searchBaseModelWithTrash()
throws Exception
- Throws:
Exception
searchBaseModelWithTrash
protected void searchBaseModelWithTrash(int initialBaseModelsSearchCount)
throws Exception
- Throws:
Exception
searchBaseModelWithUpdate
protected void searchBaseModelWithUpdate()
throws Exception
- Throws:
Exception
searchByDDMStructureField
protected void searchByDDMStructureField()
throws Exception
- Throws:
Exception
searchByKeywords
protected void searchByKeywords()
throws Exception
- Throws:
Exception
searchByKeywordsInsideParentBaseModel
protected void searchByKeywordsInsideParentBaseModel()
throws Exception
- Throws:
Exception
searchByMixedPhraseKeywords
protected void searchByMixedPhraseKeywords()
throws Exception
- Throws:
Exception
searchComments
protected void searchComments()
throws Exception
- Throws:
Exception
searchExpireVersions
protected void searchExpireVersions(boolean expireAllVersions)
throws Exception
- Throws:
Exception
searchGroupEntriesCount
protected long searchGroupEntriesCount(long groupId,
long userId)
throws Exception
- Throws:
Exception
searchMyEntries
protected void searchMyEntries()
throws Exception
- Throws:
Exception
searchRecentEntries
protected void searchRecentEntries()
throws Exception
- Throws:
Exception
searchStatus
protected void searchStatus()
throws Exception
- Throws:
Exception
searchVersions
protected void searchVersions()
throws Exception
- Throws:
Exception
searchWithinDDMStructure
protected void searchWithinDDMStructure()
throws Exception
- Throws:
Exception
testUserPermissions
protected void testUserPermissions(boolean addBaseModelPermission,
boolean addParentBaseModelPermission)
throws Exception
- Throws:
Exception
updateBaseModel
protected BaseModel<?> updateBaseModel(BaseModel<?> baseModel,
String keywords,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
updateDDMStructure
protected void updateDDMStructure(ServiceContext serviceContext)
throws Exception
- Throws:
Exception