001
014
015 package com.liferay.portal.kernel.test.util;
016
017 import com.liferay.portal.kernel.search.SearchContext;
018
019
022 public class SearchContextTestUtil {
023
024 public static SearchContext getSearchContext() throws Exception {
025 return getSearchContext(TestPropsValues.getGroupId());
026 }
027
028 public static SearchContext getSearchContext(long groupId)
029 throws Exception {
030
031 SearchContext searchContext = new SearchContext();
032
033 searchContext.setCompanyId(TestPropsValues.getCompanyId());
034 searchContext.setGroupIds(new long[] {groupId});
035 searchContext.setUserId(TestPropsValues.getUserId());
036
037 return searchContext;
038 }
039
040 }