示例#1
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からの取得リストの並び保証なし
 }
示例#2
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からの取得リストの並び保証なし
 }
示例#3
0
 // -------------------------------------+
 @Test
 public void findRepostByUsers_Entity_単数_00() {
   User usr1 = User.findBySerialCode("usr-goro").first();
   List<RepostBase> lst = RepostBase.findRepostByUsers(usr1).fetch();
   assertThat(lst.size(), is(4));
   // DBからの取得リストの並び保証なし
 }
示例#4
0
 // -------------------------------------+
 @Test
 public void findRepostByAccounts_Entity_単数_00() {
   Account acnt1 = Account.findByLoginName("goro_san").first();
   List<RepostBase> lst = RepostBase.findRepostByAccounts(acnt1).fetch();
   assertThat(lst.size(), is(17));
   // DBからの取得リストの並び保証なし
 }
示例#5
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からの取得リストの並び保証なし
 }
示例#6
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からの取得リストの並び保証なし
 }
示例#7
0
 // -------------------------------------+
 @Test
 public void findRepostByCategories_Entity_単数_投稿者_00() {
   Category cat1 = Category.findBySerialCode("cat-biz").first();
   Account acnt = Account.findByLoginName("goro_san").first();
   List<RepostBase> lst = RepostBase.findRepostByCategories(cat1).contributor(acnt).fetch();
   assertThat(lst.size(), is(2));
   // DBからの取得リストの並び保証なし
 }
示例#8
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).fetch();
   assertThat(lst.size(), is(5));
   // DBからの取得リストの並び保証なし
 }
示例#9
0
 // -------------------------------------+
 @Test
 public void findRepostByTweets_Entity_単数_投稿者_00() {
   Tweet twt1 = Tweet.findBySerialCode("twt-goro2").first();
   Account acnt = Account.findByLoginName("goro_san").first();
   List<RepostBase> lst = RepostBase.findRepostByTweets(twt1).contributor(acnt).fetch();
   assertThat(lst.size(), is(2));
   // DBからの取得リストの並び保証なし
 }
示例#10
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).fetch();
   assertThat(lst.size(), is(3));
   // DBからの取得リストの並び保証なし
 }
示例#11
0
 // -------------------------------------+
 @Test
 public void findRepostByUsers_Entity_単数_投稿者_00() {
   User usr1 = User.findBySerialCode("usr-goro").first();
   Account acnt = Account.findByLoginName("goro_san").first();
   List<RepostBase> lst = RepostBase.findRepostByUsers(usr1).contributor(acnt).fetch();
   assertThat(lst.size(), is(2));
   // DBからの取得リストの並び保証なし
 }
示例#12
0
 @Test
 public void findRepostByAccounts_String_複数_降順_00() {
   List<RepostBase> lst =
       RepostBase.findRepostByAccounts("usr-goro", "usr-jiro")
           .orderBy(RepostBase.OrderBy.DATE_OF_REPOST_DESC)
           .fetch();
   assertThat(lst.size(), is(24));
   assertThat(lst.get(0).contributor.loginUser.screenName, is("goro_san"));
 }
示例#13
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からの取得リストの並び保証なし
 }
示例#14
0
 // -------------------------------------+
 @Test
 public void findRepostByAccounts_Entity_単数_降順_00() {
   Account acnt1 = Account.findByLoginName("goro_san").first();
   List<RepostBase> lst =
       RepostBase.findRepostByAccounts(acnt1)
           .orderBy(RepostBase.OrderBy.DATE_OF_REPOST_DESC)
           .fetch();
   assertThat(lst.size(), is(17));
   assertThat(lst.get(0).contributor.loginUser.screenName, is("goro_san"));
 }
示例#15
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"));
 }
示例#16
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"));
 }
示例#17
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"));
 }
示例#18
0
 // -------------------------------------+
 @Test
 public void findRepostByUsers_Entity_単数_投稿者_降順_00() {
   User usr1 = User.findBySerialCode("usr-goro").first();
   Account acnt = Account.findByLoginName("goro_san").first();
   List<RepostBase> lst =
       RepostBase.findRepostByUsers(usr1)
           .contributor(acnt)
           .orderBy(RepostBase.OrderBy.DATE_OF_REPOST_DESC)
           .fetch();
   assertThat(lst.size(), is(2));
   assertThat(lst.get(0).getItem().serialCode, is("usr-goro"));
 }
示例#19
0
 @Test
 public void findRepostByUsers_String_単数_00() {
   List<RepostBase> lst = RepostBase.findRepostByUsers("usr-goro").fetch();
   assertThat(lst.size(), is(4));
   // DBからの取得リストの並び保証なし
 }
示例#20
0
 @Test
 public void findRepostByTweets_String_複数_00() {
   List<RepostBase> lst = RepostBase.findRepostByTweets("twt-goro2", "twt-jiro1").fetch();
   assertThat(lst.size(), is(7));
   // DBからの取得リストの並び保証なし
 }
示例#21
0
 // =============================================*
 // 問題なし
 @Test
 public void findRepostByUsers_例外_00() {
   List<RepostBase> lst = RepostBase.findRepostByUsers((Object) null).fetch();
   assertThat(lst.size(), is(10));
 }
示例#22
0
 @Test
 public void findRepostByAccounts_String_複数_00() {
   List<RepostBase> lst = RepostBase.findRepostByAccounts("usr-goro", "usr-jiro").fetch();
   assertThat(lst.size(), is(24));
   // DBからの取得リストの並び保証なし
 }
示例#23
0
 @Test
 public void findRepostByCategories_String_複数_00() {
   List<RepostBase> lst = RepostBase.findRepostByCategories("cat-biz", "cat-enta").fetch();
   assertThat(lst.size(), is(5));
   // DBからの取得リストの並び保証なし
 }
示例#24
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からの取得リストの並び保証なし
 }