示例#1
0
 @Test
 public void findRepostByCategories_String_単数_投稿者_00() {
   Account acnt = Account.findByLoginName("goro_san").first();
   List<RepostBase> lst = RepostBase.findRepostByCategories("cat-biz").contributor(acnt).fetch();
   assertThat(lst.size(), is(2));
   // DBからの取得リストの並び保証なし
 }
示例#2
0
 // -------------------------------------+
 @Test
 public void findRepostByCategories_Entity_単数_00() {
   Category cat1 = Category.findBySerialCode("cat-biz").first();
   List<RepostBase> lst = RepostBase.findRepostByCategories(cat1).fetch();
   assertThat(lst.size(), is(2));
   // DBからの取得リストの並び保証なし
 }
示例#3
0
 @Test
 public void findRepostByCategories_Entity_複数_投稿者_00() {
   Category cat1 = Category.findBySerialCode("cat-biz").first();
   Category cat2 = Category.findBySerialCode("cat-enta").first();
   Account acnt = Account.findByLoginName("goro_san").first();
   List<RepostBase> lst = RepostBase.findRepostByCategories(cat1, cat2).contributor(acnt).fetch();
   assertThat(lst.size(), is(3));
   // DBからの取得リストの並び保証なし
 }
示例#4
0
 @Test
 public void findRepostByCategories_String_複数_投稿者_降順_00() {
   Account acnt = Account.findByLoginName("goro_san").first();
   List<RepostBase> lst =
       RepostBase.findRepostByCategories("cat-biz", "cat-enta")
           .contributor(acnt)
           .orderBy(RepostBase.OrderBy.DATE_OF_REPOST_DESC)
           .fetch();
   assertThat(lst.size(), is(3));
   assertThat(lst.get(0).getLabel().serialCode, is("cat-biz"));
 }
示例#5
0
 @Test
 public void findRepostByCategories_String_複数_00() {
   List<RepostBase> lst = RepostBase.findRepostByCategories("cat-biz", "cat-enta").fetch();
   assertThat(lst.size(), is(5));
   // DBからの取得リストの並び保証なし
 }
示例#6
0
 // =============================================*
 // 問題なし
 @Test
 public void findRepostByCategories_例外_00() {
   List<RepostBase> lst = RepostBase.findRepostByCategories((Object) null).fetch();
   assertThat(lst.size(), is(10));
 }