String content = "Content";
for (int i = 0; i < 30; i++) {
createEntry(title + i, content + i);
}
EntryCondition condition = new EntryCondition();
PaginationSupport<Entry> ps = entryService.search(condition, new Range(0, 10), new Sorter().asc("publishDate"));
assertEquals(30, ps.getTotalCount());
title = "Android";
for (int j = 0; j < 5; j ++) {
createEntry(title + j, content + j);
}
condition.setKeyword("Android");
ps = entryService.search(condition, new Range(0, 5), new Sorter().asc("title"));
assertEquals(5, ps.getTotalCount());
}