Skip to content

Commit

Permalink
Google Java Format
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Nov 28, 2023
1 parent ca4bdc5 commit 0b01514
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public ResponseEntity<ShareInfoResponse> getShare(@PathVariable UUID id) {
}

@GetMapping()
public ResponseEntity<List<GroupInfoResponse>> getMyGroups(){
public ResponseEntity<List<GroupInfoResponse>> getMyGroups() {
return ResponseEntity.ok(groupService.getMyGroups());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@ public interface GroupMapper {
@Mapping(target = "groupId", source = "group.id")
@Mapping(target = "memberId", source = "member.id")
ShareInfoResponse toShareInfo(GroupMember groupMember);

}
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ public GroupInfoResponse getGroupInfoResponse(Group group) {
}

@Transactional
public List<GroupInfoResponse> getMyGroups(){
public List<GroupInfoResponse> getMyGroups() {
List<GroupInfoResponse> responses = new ArrayList<>();

Member loginMember = authService.getMemberByJwt();

for(GroupMember groupMember : loginMember.getGroupMembers()){
for (GroupMember groupMember : loginMember.getGroupMembers()) {
responses.add(groupMapper.toGroupInfo(groupMember.getGroup()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,16 @@ void getShare() throws Exception {

@Test
@DisplayName("자신의 그룹 정보가 정상적으로 반환되는가")
void getMyGroups() throws Exception{
void getMyGroups() throws Exception {
// given
final UUID leaderId = UUID.randomUUID();

List<GroupInfoResponse> responseList = new ArrayList<>();

GroupInfoResponse response1 = new GroupInfoResponse(UUID.randomUUID(),leaderId,"BLACK_PINK","I_LOVE_YOU_LOSE");
GroupInfoResponse response2 = new GroupInfoResponse(UUID.randomUUID(),leaderId,"LE_SSERAFIM","I_LOVE_YOU_채원");
GroupInfoResponse response1 =
new GroupInfoResponse(UUID.randomUUID(), leaderId, "BLACK_PINK", "I_LOVE_YOU_LOSE");
GroupInfoResponse response2 =
new GroupInfoResponse(UUID.randomUUID(), leaderId, "LE_SSERAFIM", "I_LOVE_YOU_채원");

responseList.add(response1);
responseList.add(response2);
Expand All @@ -227,8 +229,7 @@ void getMyGroups() throws Exception{
.contentType(MediaType.APPLICATION_JSON)
.header(
"Authorization",
"Bearer wefa3fsdczf32.gaoiuergf92.gb5hsa2jgh")
);
"Bearer wefa3fsdczf32.gaoiuergf92.gb5hsa2jgh"));
// then
perform.andExpect(status().isOk());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ void changeShare() {

@Test
@DisplayName("자신이 소속된 Group정보들이 반환되는가")
void getMyGroups(){
void getMyGroups() {
// given
Member member = memberRepository.save(authService.getMemberByJwt());

Expand Down

0 comments on commit 0b01514

Please sign in to comment.