Пример #1
0
 @Test
 public void findRepostByUsers_Entity_複数_00() {
   User usr1 = User.findBySerialCode("usr-goro").first();
   User usr2 = User.findBySerialCode("usr-jiro").first();
   List<RepostBase> lst = RepostBase.findRepostByUsers(usr1, usr2).fetch();
   assertThat(lst.size(), is(9));
   // DBからの取得リストの並び保証なし
 }
Пример #2
0
 @Test
 public void findRepostByUsers_Entity_複数_投稿者_00() {
   User usr1 = User.findBySerialCode("usr-goro").first();
   User usr2 = User.findBySerialCode("usr-jiro").first();
   Account acnt = Account.findByLoginName("goro_san").first();
   List<RepostBase> lst = RepostBase.findRepostByUsers(usr1, usr2).contributor(acnt).fetch();
   assertThat(lst.size(), is(5));
   // DBからの取得リストの並び保証なし
 }
Пример #3
0
 @Test
 public void findRepostByUsers_Entity_複数_投稿者_降順_00() {
   User usr1 = User.findBySerialCode("usr-goro").first();
   User usr2 = User.findBySerialCode("usr-jiro").first();
   Account acnt = Account.findByLoginName("goro_san").first();
   List<RepostBase> lst =
       RepostBase.findRepostByUsers(usr1, usr2)
           .contributor(acnt)
           .orderBy(RepostBase.OrderBy.DATE_OF_REPOST_DESC)
           .fetch();
   assertThat(lst.size(), is(5));
   assertThat(lst.get(0).getItem().serialCode, is("usr-jiro"));
 }