Skip to content

Commit

Permalink
[Week10][Chap3] Feat : 페이징(#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
songhee1 committed Nov 24, 2023
1 parent 24f53af commit 94dc0a9
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,15 @@ public void sort(){
assertThat(membernull.getUsername()).isNull();

}

@Test
public void paging1(){
List<Member> result = queryFactory
.selectFrom(member)
.orderBy(member.username.desc())
.offset(1) //몇번째?
.limit(2)
.fetch();
assertThat(result.size()).isEqualTo(2);
}
}

0 comments on commit 94dc0a9

Please sign in to comment.