Example #1
0
 private void checkTimestamps(List<Post> posts) {
   long time = 0;
   List<String> pids = new LinkedList<String>();
   for (Post post : posts) {
     Assert.assertTrue(!pids.contains(post.getPid()));
     pids.add(post.getPid());
     if (time == 0) {
       time = post.getCreatedTime().getTime();
     } else {
       Assert.assertTrue(time >= post.getCreatedTime().getTime());
       time = post.getCreatedTime().getTime();
     }
   }
 }
Example #2
0
 @Override
 protected List<MoimirPost> getPosts(MoimirTemplate template, Post from, int count) {
   return template.feedOperations().getPosts(from == null ? null : from.getPid(), count);
 }