예제 #1
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からの取得リストの並び保証なし
 }
예제 #2
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"));
 }
예제 #3
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"));
 }
예제 #4
0
 @Test
 public void findRepostByAccounts_String_複数_00() {
   List<RepostBase> lst = RepostBase.findRepostByAccounts("usr-goro", "usr-jiro").fetch();
   assertThat(lst.size(), is(24));
   // DBからの取得リストの並び保証なし
 }
예제 #5
0
 //	@Test(expected = IllegalArgumentException.class)
 @Test(expected = DeprecatedMethodUseException.class)
 public void findRepostByAccounts_例外_02() throws Exception {
   List<RepostBase> lst =
       RepostBase.findRepostByAccounts("usr-goro").contributor("goro_san").fetch();
 }
예제 #6
0
 // NGな用法 contributorは呼び出してはいけない
 //	@Test(expected = IllegalArgumentException.class)
 @Test(expected = DeprecatedMethodUseException.class)
 public void findRepostByAccounts_例外_01() throws Exception {
   Account acnt = Account.findByLoginName("goro_san").first();
   List<RepostBase> lst = RepostBase.findRepostByAccounts("usr-goro").contributor(acnt).fetch();
 }
예제 #7
0
 // =============================================*
 @Test(expected = IllegalArgumentException.class)
 public void findRepostByAccounts_例外_00() {
   List<RepostBase> lst = RepostBase.findRepostByAccounts((Object) null).fetch();
 }