Exemplo n.º 1
0
 @Test
 public void findRepostByTags_Entity_複数_00() {
   Tag tag1 = Tag.findBySerialCode("tag-goro-red").first();
   Tag tag2 = Tag.findBySerialCode("tag-jiro-hello").first();
   List<RepostBase> lst = RepostBase.findRepostByTags(tag1, tag2).fetch();
   assertThat(lst.size(), is(5));
   // DBからの取得リストの並び保証なし
 }
Exemplo n.º 2
0
 @Test
 public void findRepostByTags_Entity_複数_投稿者_00() {
   Tag tag1 = Tag.findBySerialCode("tag-goro-red").first();
   Tag tag2 = Tag.findBySerialCode("tag-jiro-hello").first();
   Account acnt = Account.findByLoginName("goro_san").first();
   List<RepostBase> lst = RepostBase.findRepostByTags(tag1, tag2).contributor(acnt).fetch();
   assertThat(lst.size(), is(3));
   // DBからの取得リストの並び保証なし
 }
Exemplo n.º 3
0
 @Test
 public void findRepostByTags_Entity_複数_投稿者_降順_00() {
   Tag tag1 = Tag.findBySerialCode("tag-goro-red").first();
   Tag tag2 = Tag.findBySerialCode("tag-jiro-hello").first();
   Account acnt = Account.findByLoginName("goro_san").first();
   List<RepostBase> lst =
       RepostBase.findRepostByTags(tag1, tag2)
           .contributor(acnt)
           .orderBy(RepostBase.OrderBy.DATE_OF_REPOST_DESC)
           .fetch();
   assertThat(lst.size(), is(3));
   assertThat(lst.get(0).getLabel().serialCode, is("tag-goro-red"));
 }