public abstract class BaseAssetSearchTestCase
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static com.liferay.portal.kernel.test.rule.AggregateTestRule |
aggregateTestRule |
com.liferay.portal.search.test.rule.SearchTestRule |
searchTestRule |
| Constructor and Description |
|---|
BaseAssetSearchTestCase() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract com.liferay.portal.kernel.model.BaseModel<?> |
addBaseModel(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel,
java.util.Map<java.util.Locale,java.lang.String> titleMap,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
protected com.liferay.portal.kernel.model.BaseModel<?> |
addBaseModel(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel,
java.lang.String keywords,
java.util.Date expirationDate,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
protected abstract com.liferay.portal.kernel.model.BaseModel<?> |
addBaseModel(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel,
java.lang.String keywords,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
protected java.util.List<com.liferay.portal.kernel.model.BaseModel<?>> |
addBaseModels(com.liferay.portal.kernel.model.Group[] groups,
java.lang.String keywords,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
protected com.liferay.portal.kernel.model.BaseModel<?> |
addBaseModelWithClassType(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel,
java.lang.String keywords,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
protected com.liferay.portal.kernel.model.BaseModel<?> |
addBaseModelWithWorkflow(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel,
java.lang.String keywords,
boolean approved,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
protected void |
assertCount(int expectedCount,
com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
com.liferay.portal.kernel.search.SearchContext searchContext) |
protected void |
assertCount(int expectedCount,
com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
com.liferay.portal.kernel.search.SearchContext searchContext,
int start,
int end) |
protected java.lang.String[] |
format(java.util.Date[] dates,
java.text.DateFormat dateFormat) |
protected java.util.Date[] |
generateRandomDates(java.util.Date startDate,
int size) |
protected abstract java.lang.Class<?> |
getBaseModelClass() |
protected java.lang.String |
getBaseModelClassName() |
protected long[] |
getClassTypeIds() |
protected java.util.Date[] |
getExpirationDates(java.util.List<com.liferay.asset.kernel.model.AssetEntry> assetEntries,
java.lang.String orderByType) |
protected java.lang.String[] |
getOrderedTitles(java.util.List<java.util.Map<java.util.Locale,java.lang.String>> orderedTitleMaps,
java.util.Locale locale) |
protected com.liferay.portal.kernel.model.BaseModel<?> |
getParentBaseModel(com.liferay.portal.kernel.model.Group group,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
protected abstract java.lang.String |
getSearchKeywords() |
protected java.lang.String[] |
getTitles(java.util.List<com.liferay.asset.kernel.model.AssetEntry> assetEntries,
java.util.Locale locale) |
protected boolean |
isLocalizableTitle() |
protected java.util.List<com.liferay.asset.kernel.model.AssetEntry> |
search(com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
com.liferay.portal.kernel.search.SearchContext searchContext) |
protected int |
searchCount(com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
com.liferay.portal.kernel.search.SearchContext searchContext,
int start,
int end) |
void |
setUp() |
void |
testAllAssetCategories1() |
void |
testAllAssetCategories2() |
void |
testAllAssetCategories3() |
void |
testAllAssetCategories4() |
void |
testAllAssetTags1() |
void |
testAllAssetTags2() |
void |
testAllAssetTags3() |
void |
testAllAssetTags4() |
void |
testAllAssetTagsMultipleGroups1() |
void |
testAllAssetTagsMultipleGroups2() |
void |
testAllAssetTagsMultipleGroups3() |
void |
testAllAssetTagsMultipleGroups4() |
void |
testAnyAssetCategories1() |
void |
testAnyAssetCategories2() |
void |
testAnyAssetCategories3() |
void |
testAnyAssetCategories4() |
void |
testAnyAssetTags1() |
void |
testAnyAssetTags2() |
void |
testAnyAssetTags3() |
void |
testAnyAssetTags4() |
protected void |
testAssetCategorization(com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
int expectedResults) |
protected void |
testAssetCategorization(com.liferay.portal.kernel.model.Group[] groups,
com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
int expectedResults) |
void |
testAssetCategoryAllAndAny() |
void |
testAssetCategoryNotAllAndAll() |
void |
testAssetCategoryNotAllAndAny() |
void |
testAssetCategoryNotAllAndNotAny() |
void |
testAssetCategoryNotAnyAndAll() |
void |
testAssetCategoryNotAnyAndAny() |
void |
testAssetTagsAllAndAny() |
void |
testAssetTagsNotAllAndAll() |
void |
testAssetTagsNotAllAndAny() |
void |
testAssetTagsNotAllAndNotAny() |
void |
testAssetTagsNotAnyAndAll() |
void |
testAssetTagsNotAnyAndAny() |
void |
testClassName1() |
void |
testClassName2() |
protected void |
testClassNames(com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
int expectedResult) |
protected void |
testClassTypeIds(com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
boolean classType) |
void |
testClassTypeIds1() |
void |
testClassTypeIds2() |
void |
testGroups() |
void |
testNotAllAssetCategories1() |
void |
testNotAllAssetCategories2() |
void |
testNotAllAssetCategories3() |
void |
testNotAllAssetCategories4() |
void |
testNotAllAssetTags1() |
void |
testNotAllAssetTags2() |
void |
testNotAllAssetTags3() |
void |
testNotAllAssetTags4() |
void |
testNotAllAssetTagsMultipleGroups1() |
void |
testNotAllAssetTagsMultipleGroups2() |
void |
testNotAllAssetTagsMultipleGroups3() |
void |
testNotAllAssetTagsMultipleGroups4() |
void |
testNotAnyAssetCategories1() |
void |
testNotAnyAssetCategories2() |
void |
testNotAnyAssetCategories3() |
void |
testNotAnyAssetCategories4() |
void |
testNotAnyAssetTags1() |
void |
testNotAnyAssetTags2() |
void |
testNotAnyAssetTags3() |
void |
testNotAnyAssetTags4() |
protected void |
testOrderByExpirationDate(com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
java.lang.String orderByType,
java.util.Date[] expirationDates) |
void |
testOrderByExpirationDateAsc() |
void |
testOrderByExpirationDateDesc() |
protected void |
testOrderByTitle(com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
java.lang.String orderByType,
java.util.List<java.util.Map<java.util.Locale,java.lang.String>> titleMaps,
java.util.List<java.util.Map<java.util.Locale,java.lang.String>> orderedTitleMaps,
java.util.Locale[] locales) |
void |
testOrderByTitleAsc() |
void |
testOrderByTitleDesc() |
protected void |
testPaginationType(com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
int size) |
void |
testPaginationTypeNone() |
void |
testPaginationTypeRegular() |
void |
testPaginationTypeSimple() |
public static final com.liferay.portal.kernel.test.rule.AggregateTestRule aggregateTestRule
public com.liferay.portal.search.test.rule.SearchTestRule searchTestRule
public void setUp()
throws java.lang.Exception
java.lang.Exceptionpublic void testAllAssetCategories1()
throws java.lang.Exception
java.lang.Exceptionpublic void testAllAssetCategories2()
throws java.lang.Exception
java.lang.Exceptionpublic void testAllAssetCategories3()
throws java.lang.Exception
java.lang.Exceptionpublic void testAllAssetCategories4()
throws java.lang.Exception
java.lang.Exceptionpublic void testAllAssetTags1()
throws java.lang.Exception
java.lang.Exceptionpublic void testAllAssetTags2()
throws java.lang.Exception
java.lang.Exceptionpublic void testAllAssetTags3()
throws java.lang.Exception
java.lang.Exceptionpublic void testAllAssetTags4()
throws java.lang.Exception
java.lang.Exceptionpublic void testAllAssetTagsMultipleGroups1()
throws java.lang.Exception
java.lang.Exceptionpublic void testAllAssetTagsMultipleGroups2()
throws java.lang.Exception
java.lang.Exceptionpublic void testAllAssetTagsMultipleGroups3()
throws java.lang.Exception
java.lang.Exceptionpublic void testAllAssetTagsMultipleGroups4()
throws java.lang.Exception
java.lang.Exceptionpublic void testAnyAssetCategories1()
throws java.lang.Exception
java.lang.Exceptionpublic void testAnyAssetCategories2()
throws java.lang.Exception
java.lang.Exceptionpublic void testAnyAssetCategories3()
throws java.lang.Exception
java.lang.Exceptionpublic void testAnyAssetCategories4()
throws java.lang.Exception
java.lang.Exceptionpublic void testAnyAssetTags1()
throws java.lang.Exception
java.lang.Exceptionpublic void testAnyAssetTags2()
throws java.lang.Exception
java.lang.Exceptionpublic void testAnyAssetTags3()
throws java.lang.Exception
java.lang.Exceptionpublic void testAnyAssetTags4()
throws java.lang.Exception
java.lang.Exceptionpublic void testAssetCategoryAllAndAny()
throws java.lang.Exception
java.lang.Exceptionpublic void testAssetCategoryNotAllAndAll()
throws java.lang.Exception
java.lang.Exceptionpublic void testAssetCategoryNotAllAndAny()
throws java.lang.Exception
java.lang.Exceptionpublic void testAssetCategoryNotAllAndNotAny()
throws java.lang.Exception
java.lang.Exceptionpublic void testAssetCategoryNotAnyAndAll()
throws java.lang.Exception
java.lang.Exceptionpublic void testAssetCategoryNotAnyAndAny()
throws java.lang.Exception
java.lang.Exceptionpublic void testAssetTagsAllAndAny()
throws java.lang.Exception
java.lang.Exceptionpublic void testAssetTagsNotAllAndAll()
throws java.lang.Exception
java.lang.Exceptionpublic void testAssetTagsNotAllAndAny()
throws java.lang.Exception
java.lang.Exceptionpublic void testAssetTagsNotAllAndNotAny()
throws java.lang.Exception
java.lang.Exceptionpublic void testAssetTagsNotAnyAndAll()
throws java.lang.Exception
java.lang.Exceptionpublic void testAssetTagsNotAnyAndAny()
throws java.lang.Exception
java.lang.Exceptionpublic void testClassName1()
throws java.lang.Exception
java.lang.Exceptionpublic void testClassName2()
throws java.lang.Exception
java.lang.Exceptionpublic void testClassTypeIds1()
throws java.lang.Exception
java.lang.Exceptionpublic void testClassTypeIds2()
throws java.lang.Exception
java.lang.Exceptionpublic void testGroups()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotAllAssetCategories1()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotAllAssetCategories2()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotAllAssetCategories3()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotAllAssetCategories4()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotAllAssetTags1()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotAllAssetTags2()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotAllAssetTags3()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotAllAssetTags4()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotAllAssetTagsMultipleGroups1()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotAllAssetTagsMultipleGroups2()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotAllAssetTagsMultipleGroups3()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotAllAssetTagsMultipleGroups4()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotAnyAssetCategories1()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotAnyAssetCategories2()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotAnyAssetCategories3()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotAnyAssetCategories4()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotAnyAssetTags1()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotAnyAssetTags2()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotAnyAssetTags3()
throws java.lang.Exception
java.lang.Exceptionpublic void testNotAnyAssetTags4()
throws java.lang.Exception
java.lang.Exceptionpublic void testOrderByExpirationDateAsc()
throws java.lang.Exception
java.lang.Exceptionpublic void testOrderByExpirationDateDesc()
throws java.lang.Exception
java.lang.Exceptionpublic void testOrderByTitleAsc()
throws java.lang.Exception
java.lang.Exceptionpublic void testOrderByTitleDesc()
throws java.lang.Exception
java.lang.Exceptionpublic void testPaginationTypeNone()
throws java.lang.Exception
java.lang.Exceptionpublic void testPaginationTypeRegular()
throws java.lang.Exception
java.lang.Exceptionpublic void testPaginationTypeSimple()
throws java.lang.Exception
java.lang.Exceptionprotected abstract com.liferay.portal.kernel.model.BaseModel<?> addBaseModel(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel,
java.util.Map<java.util.Locale,java.lang.String> titleMap,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws java.lang.Exception
java.lang.Exceptionprotected com.liferay.portal.kernel.model.BaseModel<?> addBaseModel(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel,
java.lang.String keywords,
java.util.Date expirationDate,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws java.lang.Exception
java.lang.Exceptionprotected abstract com.liferay.portal.kernel.model.BaseModel<?> addBaseModel(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel,
java.lang.String keywords,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws java.lang.Exception
java.lang.Exceptionprotected java.util.List<com.liferay.portal.kernel.model.BaseModel<?>> addBaseModels(com.liferay.portal.kernel.model.Group[] groups,
java.lang.String keywords,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws java.lang.Exception
java.lang.Exceptionprotected com.liferay.portal.kernel.model.BaseModel<?> addBaseModelWithClassType(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel,
java.lang.String keywords,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws java.lang.Exception
java.lang.Exceptionprotected com.liferay.portal.kernel.model.BaseModel<?> addBaseModelWithWorkflow(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel,
java.lang.String keywords,
boolean approved,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws java.lang.Exception
java.lang.Exceptionprotected void assertCount(int expectedCount,
com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
com.liferay.portal.kernel.search.SearchContext searchContext)
throws java.lang.Exception
java.lang.Exceptionprotected void assertCount(int expectedCount,
com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
com.liferay.portal.kernel.search.SearchContext searchContext,
int start,
int end)
throws java.lang.Exception
java.lang.Exceptionprotected java.lang.String[] format(java.util.Date[] dates,
java.text.DateFormat dateFormat)
protected java.util.Date[] generateRandomDates(java.util.Date startDate,
int size)
protected abstract java.lang.Class<?> getBaseModelClass()
protected java.lang.String getBaseModelClassName()
protected long[] getClassTypeIds()
protected java.util.Date[] getExpirationDates(java.util.List<com.liferay.asset.kernel.model.AssetEntry> assetEntries,
java.lang.String orderByType)
throws java.lang.Exception
java.lang.Exceptionprotected java.lang.String[] getOrderedTitles(java.util.List<java.util.Map<java.util.Locale,java.lang.String>> orderedTitleMaps,
java.util.Locale locale)
throws java.lang.Exception
java.lang.Exceptionprotected com.liferay.portal.kernel.model.BaseModel<?> getParentBaseModel(com.liferay.portal.kernel.model.Group group,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws java.lang.Exception
java.lang.Exceptionprotected abstract java.lang.String getSearchKeywords()
protected java.lang.String[] getTitles(java.util.List<com.liferay.asset.kernel.model.AssetEntry> assetEntries,
java.util.Locale locale)
throws java.lang.Exception
java.lang.Exceptionprotected boolean isLocalizableTitle()
protected java.util.List<com.liferay.asset.kernel.model.AssetEntry> search(com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
com.liferay.portal.kernel.search.SearchContext searchContext)
throws java.lang.Exception
java.lang.Exceptionprotected int searchCount(com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
com.liferay.portal.kernel.search.SearchContext searchContext,
int start,
int end)
throws java.lang.Exception
java.lang.Exceptionprotected void testAssetCategorization(com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
int expectedResults)
throws java.lang.Exception
java.lang.Exceptionprotected void testAssetCategorization(com.liferay.portal.kernel.model.Group[] groups,
com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
int expectedResults)
throws java.lang.Exception
java.lang.Exceptionprotected void testClassNames(com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
int expectedResult)
throws java.lang.Exception
java.lang.Exceptionprotected void testClassTypeIds(com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
boolean classType)
throws java.lang.Exception
java.lang.Exceptionprotected void testOrderByExpirationDate(com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
java.lang.String orderByType,
java.util.Date[] expirationDates)
throws java.lang.Exception
java.lang.Exceptionprotected void testOrderByTitle(com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
java.lang.String orderByType,
java.util.List<java.util.Map<java.util.Locale,java.lang.String>> titleMaps,
java.util.List<java.util.Map<java.util.Locale,java.lang.String>> orderedTitleMaps,
java.util.Locale[] locales)
throws java.lang.Exception
java.lang.Exceptionprotected void testPaginationType(com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
int size)
throws java.lang.Exception
java.lang.Exception