예제 #1
0
 @Test
 public void findRepostByTweets_String_単数_投稿者_00() {
   Account acnt = Account.findByLoginName("goro_san").first();
   List<RepostBase> lst = RepostBase.findRepostByTweets("twt-goro2").contributor(acnt).fetch();
   assertThat(lst.size(), is(2));
   // DBからの取得リストの並び保証なし
 }
예제 #2
0
 // -------------------------------------+
 @Test
 public void findRepostByTweets_Entity_単数_00() {
   Tweet twt1 = Tweet.findBySerialCode("twt-goro2").first();
   List<RepostBase> lst = RepostBase.findRepostByTweets(twt1).fetch();
   assertThat(lst.size(), is(4));
   // DBからの取得リストの並び保証なし
 }
예제 #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).fetch();
   assertThat(lst.size(), is(5));
   // DBからの取得リストの並び保証なし
 }
예제 #4
0
 @Test
 public void findRepostByTweets_String_複数_投稿者_降順_00() {
   Account acnt = Account.findByLoginName("goro_san").first();
   List<RepostBase> lst =
       RepostBase.findRepostByTweets("twt-goro2", "twt-jiro1")
           .contributor(acnt)
           .orderBy(RepostBase.OrderBy.DATE_OF_REPOST_DESC)
           .fetch();
   assertThat(lst.size(), is(5));
   assertThat(lst.get(0).getItem().serialCode, is("twt-jiro1"));
 }
예제 #5
0
 @Test
 public void findRepostByTweets_String_複数_00() {
   List<RepostBase> lst = RepostBase.findRepostByTweets("twt-goro2", "twt-jiro1").fetch();
   assertThat(lst.size(), is(7));
   // DBからの取得リストの並び保証なし
 }
예제 #6
0
 // =============================================*
 // 問題なし
 @Test
 public void findRepostByTweets_例外_00() {
   List<RepostBase> lst = RepostBase.findRepostByTweets((Object) null).fetch();
   assertThat(lst.size(), is(23));
 }