Class BaseAssetSearchTestCase

java.lang.Object
com.liferay.asset.test.util.BaseAssetSearchTestCase

public abstract class BaseAssetSearchTestCase extends Object
  • 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

      public void setUp() throws Exception
      Throws:
      Exception
    • testAllAssetCategories1

      public void testAllAssetCategories1() throws Exception
      Throws:
      Exception
    • testAllAssetCategories2

      public void testAllAssetCategories2() throws Exception
      Throws:
      Exception
    • testAllAssetCategories3

      public void testAllAssetCategories3() throws Exception
      Throws:
      Exception
    • testAllAssetCategories4

      public void testAllAssetCategories4() throws Exception
      Throws:
      Exception
    • testAllAssetTags1

      public void testAllAssetTags1() throws Exception
      Throws:
      Exception
    • testAllAssetTags2

      public void testAllAssetTags2() throws Exception
      Throws:
      Exception
    • testAllAssetTags3

      public void testAllAssetTags3() throws Exception
      Throws:
      Exception
    • testAllAssetTags4

      public void testAllAssetTags4() throws Exception
      Throws:
      Exception
    • testAllAssetTagsMultipleGroups1

      public void testAllAssetTagsMultipleGroups1() throws Exception
      Throws:
      Exception
    • testAllAssetTagsMultipleGroups2

      public void testAllAssetTagsMultipleGroups2() throws Exception
      Throws:
      Exception
    • testAllAssetTagsMultipleGroups3

      public void testAllAssetTagsMultipleGroups3() throws Exception
      Throws:
      Exception
    • testAllAssetTagsMultipleGroups4

      public void testAllAssetTagsMultipleGroups4() throws Exception
      Throws:
      Exception
    • testAnyAssetCategories1

      public void testAnyAssetCategories1() throws Exception
      Throws:
      Exception
    • testAnyAssetCategories2

      public void testAnyAssetCategories2() throws Exception
      Throws:
      Exception
    • testAnyAssetCategories3

      public void testAnyAssetCategories3() throws Exception
      Throws:
      Exception
    • testAnyAssetCategories4

      public void testAnyAssetCategories4() throws Exception
      Throws:
      Exception
    • testAnyAssetTags1

      public void testAnyAssetTags1() throws Exception
      Throws:
      Exception
    • testAnyAssetTags2

      public void testAnyAssetTags2() throws Exception
      Throws:
      Exception
    • testAnyAssetTags3

      public void testAnyAssetTags3() throws Exception
      Throws:
      Exception
    • testAnyAssetTags4

      public void testAnyAssetTags4() throws Exception
      Throws:
      Exception
    • testAssetCategoryAllAndAny

      public void testAssetCategoryAllAndAny() throws Exception
      Throws:
      Exception
    • testAssetCategoryNotAllAndAll

      public void testAssetCategoryNotAllAndAll() throws Exception
      Throws:
      Exception
    • testAssetCategoryNotAllAndAny

      public void testAssetCategoryNotAllAndAny() throws Exception
      Throws:
      Exception
    • testAssetCategoryNotAllAndNotAny

      public void testAssetCategoryNotAllAndNotAny() throws Exception
      Throws:
      Exception
    • testAssetCategoryNotAnyAndAll

      public void testAssetCategoryNotAnyAndAll() throws Exception
      Throws:
      Exception
    • testAssetCategoryNotAnyAndAny

      public void testAssetCategoryNotAnyAndAny() throws Exception
      Throws:
      Exception
    • testAssetTagsAllAndAny

      public void testAssetTagsAllAndAny() throws Exception
      Throws:
      Exception
    • testAssetTagsNotAllAndAll

      public void testAssetTagsNotAllAndAll() throws Exception
      Throws:
      Exception
    • testAssetTagsNotAllAndAny

      public void testAssetTagsNotAllAndAny() throws Exception
      Throws:
      Exception
    • testAssetTagsNotAllAndNotAny

      public void testAssetTagsNotAllAndNotAny() throws Exception
      Throws:
      Exception
    • testAssetTagsNotAnyAndAll

      public void testAssetTagsNotAnyAndAll() throws Exception
      Throws:
      Exception
    • testAssetTagsNotAnyAndAny

      public void testAssetTagsNotAnyAndAny() throws Exception
      Throws:
      Exception
    • testClassName1

      public void testClassName1() throws Exception
      Throws:
      Exception
    • testClassName2

      public void testClassName2() throws Exception
      Throws:
      Exception
    • testClassTypeIds1

      public void testClassTypeIds1() throws Exception
      Throws:
      Exception
    • testClassTypeIds2

      public void testClassTypeIds2() throws Exception
      Throws:
      Exception
    • testGroups

      public void testGroups() throws Exception
      Throws:
      Exception
    • testNotAllAssetCategories1

      public void testNotAllAssetCategories1() throws Exception
      Throws:
      Exception
    • testNotAllAssetCategories2

      public void testNotAllAssetCategories2() throws Exception
      Throws:
      Exception
    • testNotAllAssetCategories3

      public void testNotAllAssetCategories3() throws Exception
      Throws:
      Exception
    • testNotAllAssetCategories4

      public void testNotAllAssetCategories4() throws Exception
      Throws:
      Exception
    • testNotAllAssetTags1

      public void testNotAllAssetTags1() throws Exception
      Throws:
      Exception
    • testNotAllAssetTags2

      public void testNotAllAssetTags2() throws Exception
      Throws:
      Exception
    • testNotAllAssetTags3

      public void testNotAllAssetTags3() throws Exception
      Throws:
      Exception
    • testNotAllAssetTags4

      public void testNotAllAssetTags4() throws Exception
      Throws:
      Exception
    • testNotAllAssetTagsMultipleGroups1

      public void testNotAllAssetTagsMultipleGroups1() throws Exception
      Throws:
      Exception
    • testNotAllAssetTagsMultipleGroups2

      public void testNotAllAssetTagsMultipleGroups2() throws Exception
      Throws:
      Exception
    • testNotAllAssetTagsMultipleGroups3

      public void testNotAllAssetTagsMultipleGroups3() throws Exception
      Throws:
      Exception
    • testNotAllAssetTagsMultipleGroups4

      public void testNotAllAssetTagsMultipleGroups4() throws Exception
      Throws:
      Exception
    • testNotAnyAssetCategories1

      public void testNotAnyAssetCategories1() throws Exception
      Throws:
      Exception
    • testNotAnyAssetCategories2

      public void testNotAnyAssetCategories2() throws Exception
      Throws:
      Exception
    • testNotAnyAssetCategories3

      public void testNotAnyAssetCategories3() throws Exception
      Throws:
      Exception
    • testNotAnyAssetCategories4

      public void testNotAnyAssetCategories4() throws Exception
      Throws:
      Exception
    • testNotAnyAssetTags1

      public void testNotAnyAssetTags1() throws Exception
      Throws:
      Exception
    • testNotAnyAssetTags2

      public void testNotAnyAssetTags2() throws Exception
      Throws:
      Exception
    • testNotAnyAssetTags3

      public void testNotAnyAssetTags3() throws Exception
      Throws:
      Exception
    • testNotAnyAssetTags4

      public void testNotAnyAssetTags4() throws Exception
      Throws:
      Exception
    • testOrderByExpirationDateAsc

      public void testOrderByExpirationDateAsc() throws Exception
      Throws:
      Exception
    • testOrderByExpirationDateDesc

      public void testOrderByExpirationDateDesc() throws Exception
      Throws:
      Exception
    • testOrderByTitleAsc

      public void testOrderByTitleAsc() throws Exception
      Throws:
      Exception
    • testOrderByTitleDesc

      public void testOrderByTitleDesc() throws Exception
      Throws:
      Exception
    • testPaginationTypeNone

      public void testPaginationTypeNone() throws Exception
      Throws:
      Exception
    • testPaginationTypeRegular

      public void testPaginationTypeRegular() throws Exception
      Throws:
      Exception
    • testPaginationTypeSimple

      public void testPaginationTypeSimple() throws Exception
      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

      protected String[] format(Date[] dates, DateFormat dateFormat)
    • generateRandomDates

      protected Date[] generateRandomDates(Date startDate, int size)
    • getBaseModelClass

      protected abstract Class<?> getBaseModelClass()
    • getBaseModelClassName

      protected String 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

      protected abstract String 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,String>> orderedTitleMaps, Locale[] locales) throws Exception
      Throws:
      Exception
    • testPaginationType

      protected void testPaginationType(com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery, int size) throws Exception
      Throws:
      Exception