Esempio n. 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からの取得リストの並び保証なし
 }
Esempio n. 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からの取得リストの並び保証なし
 }
Esempio n. 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からの取得リストの並び保証なし
 }
Esempio n. 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"));
 }
Esempio n. 5
0
 @Test
 public void findRepostByCategories_String_複数_00() {
   List<RepostBase> lst = RepostBase.findRepostByCategories("cat-biz", "cat-enta").fetch();
   assertThat(lst.size(), is(5));
   // DBからの取得リストの並び保証なし
 }
Esempio n. 6
0
 // =============================================*
 // 問題なし
 @Test
 public void findRepostByCategories_例外_00() {
   List<RepostBase> lst = RepostBase.findRepostByCategories((Object) null).fetch();
   assertThat(lst.size(), is(10));
 }