public abstract class BaseSearchTestCase
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected BaseModel<?> |
baseModel |
protected static boolean |
CHECK_BASE_MODEL_PERMISSION |
protected Group |
group |
SearchTestRule |
searchTestRule |
| Constructor and Description |
|---|
BaseSearchTestCase() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAttachment(ClassedModel classedModel) |
protected BaseModel<?> |
addBaseModel(BaseModel<?> parentBaseModel,
boolean approved,
java.lang.String keywords,
ServiceContext serviceContext) |
protected BaseModel<?> |
addBaseModelWithDDMStructure(BaseModel<?> parentBaseModel,
java.lang.String keywords,
ServiceContext serviceContext) |
protected BaseModel<?> |
addBaseModelWithWorkflow(BaseModel<?> parentBaseModel,
boolean approved,
java.util.Map<java.util.Locale,java.lang.String> keywordsMap,
ServiceContext serviceContext) |
protected abstract BaseModel<?> |
addBaseModelWithWorkflow(BaseModel<?> parentBaseModel,
boolean approved,
java.lang.String keywords,
ServiceContext serviceContext) |
protected void |
addComment(ClassedModel classedModel,
java.lang.String body,
ServiceContext serviceContext) |
protected void |
assertBaseModelsCount(int expectedCount,
SearchContext searchContext) |
protected void |
assertBaseModelsCount(int expectedCount,
java.lang.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 java.lang.Class<?> |
getBaseModelClass() |
protected java.lang.String |
getBaseModelClassName() |
protected java.lang.Long |
getBaseModelClassPK(ClassedModel classedModel) |
protected java.lang.String |
getDDMStructureFieldName() |
protected BaseModel<?> |
getParentBaseModel(BaseModel<?> parentBaseModel,
ServiceContext serviceContext) |
protected BaseModel<?> |
getParentBaseModel(Group group,
ServiceContext serviceContext) |
protected java.lang.String |
getParentBaseModelClassName() |
protected abstract java.lang.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 Hits |
searchBaseModelsCount(java.lang.Class<?> clazz,
long groupId,
SearchContext searchContext) |
protected Hits |
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(boolean searchByKeywords) |
protected void |
searchExpireVersions(boolean expireAllVersions) |
protected Hits |
searchGroupEntries(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 |
testSearchCommentsByKeywords() |
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,
java.lang.String keywords,
ServiceContext serviceContext) |
protected void |
updateDDMStructure(ServiceContext serviceContext) |
public SearchTestRule searchTestRule
protected static final boolean CHECK_BASE_MODEL_PERMISSION
protected BaseModel<?> baseModel
@DeleteAfterTestRun protected Group group
public void setUp()
throws java.lang.Exception
java.lang.Exceptionpublic void testBaseModelUserPermissions()
throws java.lang.Exception
java.lang.Exceptionpublic void testLocalizedSearch()
throws java.lang.Exception
java.lang.Exceptionpublic void testParentBaseModelUserPermissions()
throws java.lang.Exception
java.lang.Exceptionpublic void testSearchAttachments()
throws java.lang.Exception
java.lang.Exceptionpublic void testSearchBaseModel()
throws java.lang.Exception
java.lang.Exceptionpublic void testSearchBaseModelWithDelete()
throws java.lang.Exception
java.lang.Exceptionpublic void testSearchBaseModelWithTrash()
throws java.lang.Exception
java.lang.Exceptionpublic void testSearchBaseModelWithUpdate()
throws java.lang.Exception
java.lang.Exceptionpublic void testSearchByDDMStructureField()
throws java.lang.Exception
java.lang.Exceptionpublic void testSearchByKeywords()
throws java.lang.Exception
java.lang.Exceptionpublic void testSearchByKeywordsInsideParentBaseModel()
throws java.lang.Exception
java.lang.Exceptionpublic void testSearchComments()
throws java.lang.Exception
java.lang.Exceptionpublic void testSearchCommentsByKeywords()
throws java.lang.Exception
java.lang.Exceptionpublic void testSearchExpireAllVersions()
throws java.lang.Exception
java.lang.Exceptionpublic void testSearchExpireLatestVersion()
throws java.lang.Exception
java.lang.Exceptionpublic void testSearchMixedPhraseKeywords()
throws java.lang.Exception
java.lang.Exceptionpublic void testSearchMyEntries()
throws java.lang.Exception
java.lang.Exceptionpublic void testSearchRecentEntries()
throws java.lang.Exception
java.lang.Exceptionpublic void testSearchStatus()
throws java.lang.Exception
java.lang.Exceptionpublic void testSearchVersions()
throws java.lang.Exception
java.lang.Exceptionpublic void testSearchWithinDDMStructure()
throws java.lang.Exception
java.lang.Exceptionprotected void addAttachment(ClassedModel classedModel) throws java.lang.Exception
java.lang.Exceptionprotected BaseModel<?> addBaseModel(BaseModel<?> parentBaseModel, boolean approved, java.lang.String keywords, ServiceContext serviceContext) throws java.lang.Exception
java.lang.Exceptionprotected BaseModel<?> addBaseModelWithDDMStructure(BaseModel<?> parentBaseModel, java.lang.String keywords, ServiceContext serviceContext) throws java.lang.Exception
java.lang.Exceptionprotected BaseModel<?> addBaseModelWithWorkflow(BaseModel<?> parentBaseModel, boolean approved, java.util.Map<java.util.Locale,java.lang.String> keywordsMap, ServiceContext serviceContext) throws java.lang.Exception
java.lang.Exceptionprotected abstract BaseModel<?> addBaseModelWithWorkflow(BaseModel<?> parentBaseModel, boolean approved, java.lang.String keywords, ServiceContext serviceContext) throws java.lang.Exception
java.lang.Exceptionprotected void addComment(ClassedModel classedModel, java.lang.String body, ServiceContext serviceContext) throws java.lang.Exception
java.lang.Exceptionprotected void assertBaseModelsCount(int expectedCount,
SearchContext searchContext)
throws java.lang.Exception
java.lang.Exceptionprotected void assertBaseModelsCount(int expectedCount,
java.lang.String keywords,
SearchContext searchContext)
throws java.lang.Exception
java.lang.Exceptionprotected void assertGroupEntriesCount(long expectedCount)
throws java.lang.Exception
java.lang.Exceptionprotected void assertGroupEntriesCount(long expectedCount,
long userId)
throws java.lang.Exception
java.lang.Exceptionprotected void assertGroupEntriesCount(long expectedCount,
User user)
throws java.lang.Exception
java.lang.Exceptionprotected void deleteBaseModel(BaseModel<?> baseModel) throws java.lang.Exception
java.lang.Exceptionprotected void deleteBaseModel(long primaryKey)
throws java.lang.Exception
java.lang.Exceptionprotected void expireBaseModelVersions(BaseModel<?> baseModel, boolean expireAllVersions, ServiceContext serviceContext) throws java.lang.Exception
java.lang.Exceptionprotected abstract java.lang.Class<?> getBaseModelClass()
protected java.lang.String getBaseModelClassName()
protected java.lang.Long getBaseModelClassPK(ClassedModel classedModel)
protected java.lang.String getDDMStructureFieldName()
protected BaseModel<?> getParentBaseModel(BaseModel<?> parentBaseModel, ServiceContext serviceContext) throws java.lang.Exception
java.lang.Exceptionprotected BaseModel<?> getParentBaseModel(Group group, ServiceContext serviceContext) throws java.lang.Exception
java.lang.Exceptionprotected java.lang.String getParentBaseModelClassName()
protected abstract java.lang.String getSearchKeywords()
protected boolean isCheckBaseModelPermission()
protected boolean isExpirableAllVersions()
protected void moveBaseModelToTrash(long primaryKey)
throws java.lang.Exception
java.lang.Exceptionprotected void moveParentBaseModelToTrash(long primaryKey)
throws java.lang.Exception
java.lang.Exceptionprotected void searchAttachments()
throws java.lang.Exception
java.lang.Exceptionprotected void searchBaseModel()
throws java.lang.Exception
java.lang.Exceptionprotected void searchBaseModel(int initialBaseModelsSearchCount)
throws java.lang.Exception
java.lang.Exceptionprotected Hits searchBaseModelsCount(java.lang.Class<?> clazz, long groupId, SearchContext searchContext) throws java.lang.Exception
java.lang.Exceptionprotected Hits searchBaseModelsCount(SearchContext searchContext) throws java.lang.Exception
java.lang.Exceptionprotected void searchBaseModelWithDelete()
throws java.lang.Exception
java.lang.Exceptionprotected void searchBaseModelWithDelete(int initialBaseModelsSearchCount)
throws java.lang.Exception
java.lang.Exceptionprotected void searchBaseModelWithTrash()
throws java.lang.Exception
java.lang.Exceptionprotected void searchBaseModelWithTrash(int initialBaseModelsSearchCount)
throws java.lang.Exception
java.lang.Exceptionprotected void searchBaseModelWithUpdate()
throws java.lang.Exception
java.lang.Exceptionprotected void searchByDDMStructureField()
throws java.lang.Exception
java.lang.Exceptionprotected void searchByKeywords()
throws java.lang.Exception
java.lang.Exceptionprotected void searchByKeywordsInsideParentBaseModel()
throws java.lang.Exception
java.lang.Exceptionprotected void searchByMixedPhraseKeywords()
throws java.lang.Exception
java.lang.Exceptionprotected void searchComments(boolean searchByKeywords)
throws java.lang.Exception
java.lang.Exceptionprotected void searchExpireVersions(boolean expireAllVersions)
throws java.lang.Exception
java.lang.Exceptionprotected Hits searchGroupEntries(long groupId, long userId) throws java.lang.Exception
java.lang.Exceptionprotected void searchMyEntries()
throws java.lang.Exception
java.lang.Exceptionprotected void searchRecentEntries()
throws java.lang.Exception
java.lang.Exceptionprotected void searchStatus()
throws java.lang.Exception
java.lang.Exceptionprotected void searchVersions()
throws java.lang.Exception
java.lang.Exceptionprotected void searchWithinDDMStructure()
throws java.lang.Exception
java.lang.Exceptionprotected void testUserPermissions(boolean addBaseModelPermission,
boolean addParentBaseModelPermission)
throws java.lang.Exception
java.lang.Exceptionprotected BaseModel<?> updateBaseModel(BaseModel<?> baseModel, java.lang.String keywords, ServiceContext serviceContext) throws java.lang.Exception
java.lang.Exceptionprotected void updateDDMStructure(ServiceContext serviceContext) throws java.lang.Exception
java.lang.Exception