@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")); }
// -------------------------------------+ @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")); }
@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")); }
@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")); }
@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")); }
// -------------------------------------+ @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")); }