Example #1
0
 @Test
 public void findRepostByCategories_Entity_複数_00() {
   Category cat1 = Category.findBySerialCode("cat-biz").first();
   Category cat2 = Category.findBySerialCode("cat-enta").first();
   List<RepostBase> lst = RepostBase.findRepostByCategories(cat1, cat2).fetch();
   assertThat(lst.size(), is(5));
   // DBからの取得リストの並び保証なし
 }
Example #2
0
 @Test
 public void findRepostByCategories_Entity_複数_投稿者_00() {
   Category cat1 = Category.findBySerialCode("cat-biz").first();
   Category cat2 = Category.findBySerialCode("cat-enta").first();
   Account acnt = Account.findByLoginName("goro_san").first();
   List<RepostBase> lst = RepostBase.findRepostByCategories(cat1, cat2).contributor(acnt).fetch();
   assertThat(lst.size(), is(3));
   // DBからの取得リストの並び保証なし
 }
Example #3
0
 @Test
 public void findRepostByCategories_Entity_複数_投稿者_降順_00() {
   Category cat1 = Category.findBySerialCode("cat-biz").first();
   Category cat2 = Category.findBySerialCode("cat-enta").first();
   Account acnt = Account.findByLoginName("goro_san").first();
   List<RepostBase> lst =
       RepostBase.findRepostByCategories(cat1, cat2)
           .contributor(acnt)
           .orderBy(RepostBase.OrderBy.DATE_OF_REPOST_DESC)
           .fetch();
   assertThat(lst.size(), is(3));
   assertThat(lst.get(0).getLabel().serialCode, is("cat-biz"));
 }