예제 #1
0
 @Test
 public void findRepostByTags_String_単数_投稿者_00() {
   Account acnt = Account.findByLoginName("goro_san").first();
   List<RepostBase> lst = RepostBase.findRepostByTags("tag-goro-red").contributor(acnt).fetch();
   assertThat(lst.size(), is(3));
   // DBからの取得リストの並び保証なし
 }
예제 #2
0
 // -------------------------------------+
 @Test
 public void findRepostByTags_Entity_単数_00() {
   Tag tag1 = Tag.findBySerialCode("tag-goro-red").first();
   List<RepostBase> lst = RepostBase.findRepostByTags(tag1).fetch();
   assertThat(lst.size(), is(3));
   // DBからの取得リストの並び保証なし
 }
예제 #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).fetch();
   assertThat(lst.size(), is(3));
   // DBからの取得リストの並び保証なし
 }
예제 #4
0
 @Test
 public void findRepostByTags_String_複数_投稿者_降順_00() {
   Account acnt = Account.findByLoginName("goro_san").first();
   List<RepostBase> lst =
       RepostBase.findRepostByTags("tag-goro-red", "tag-jiro-hello")
           .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"));
 }
예제 #5
0
 @Test
 public void findRepostByTags_String_複数_00() {
   List<RepostBase> lst = RepostBase.findRepostByTags("tag-goro-red", "tag-jiro-hello").fetch();
   assertThat(lst.size(), is(5));
   // DBからの取得リストの並び保証なし
 }
예제 #6
0
 // =============================================*
 // 問題なし
 @Test
 public void findRepostByTags_例外_00() {
   List<RepostBase> lst = RepostBase.findRepostByTags((Object) null).fetch();
   assertThat(lst.size(), is(23));
 }