Esempio n. 1
0
 @Test
 public void findRepostByTweets_Entity_複数_00() {
   Tweet twt1 = Tweet.findBySerialCode("twt-goro2").first();
   Tweet twt2 = Tweet.findBySerialCode("twt-jiro1").first();
   List<RepostBase> lst = RepostBase.findRepostByTweets(twt1, twt2).fetch();
   assertThat(lst.size(), is(7));
   // DBからの取得リストの並び保証なし
 }
Esempio n. 2
0
 @Test
 public void findRepostByTweets_Entity_複数_投稿者_00() {
   Tweet twt1 = Tweet.findBySerialCode("twt-goro2").first();
   Tweet twt2 = Tweet.findBySerialCode("twt-jiro1").first();
   Account acnt = Account.findByLoginName("goro_san").first();
   List<RepostBase> lst = RepostBase.findRepostByTweets(twt1, twt2).contributor(acnt).fetch();
   assertThat(lst.size(), is(5));
   // DBからの取得リストの並び保証なし
 }
Esempio n. 3
0
 @Test
 public void findRepostByTweets_Entity_複数_投稿者_降順_00() {
   Tweet twt1 = Tweet.findBySerialCode("twt-goro2").first();
   Tweet twt2 = Tweet.findBySerialCode("twt-jiro1").first();
   Account acnt = Account.findByLoginName("goro_san").first();
   List<RepostBase> lst =
       RepostBase.findRepostByTweets(twt1, twt2)
           .contributor(acnt)
           .orderBy(RepostBase.OrderBy.DATE_OF_REPOST_DESC)
           .fetch();
   assertThat(lst.size(), is(5));
   assertThat(lst.get(0).getItem().serialCode, is("twt-jiro1"));
 }