use of com.epam.ta.reportportal.commons.querygen.constant.UserCriteriaConstant.CRITERIA_USER in project commons-dao by reportportal.
the class WidgetContentRepositoryTest method activityStatisticsSorting.
@Test
void activityStatisticsSorting() {
Filter filter = buildDefaultActivityFilter(1L);
List<Sort.Order> orders = filter.getTarget().getCriteriaHolders().stream().map(ch -> new Sort.Order(Sort.Direction.ASC, ch.getFilterCriteria())).collect(Collectors.toList());
Sort sort = Sort.by(orders);
List<String> contentFields = buildActivityContentFields();
filter.withCondition(new FilterCondition(Condition.EQUALS, false, "superadmin", CRITERIA_USER)).withCondition(new FilterCondition(Condition.IN, false, String.join(",", contentFields), CRITERIA_ACTION));
List<ActivityResource> activityContentList = widgetContentRepository.activityStatistics(filter, sort, 4);
assertNotNull(activityContentList);
assertEquals(4, activityContentList.size());
}
Aggregations