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