-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9d0f0b0
commit 42263ee
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
backend/src/test/java/com/twtw/backend/domain/group/service/GroupServiceTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.twtw.backend.domain.group.service; | ||
|
||
import com.twtw.backend.domain.group.dto.request.JoinGroupRequest; | ||
import com.twtw.backend.domain.group.dto.request.MakeGroupRequest; | ||
import com.twtw.backend.domain.group.dto.response.GroupInfoResponse; | ||
import com.twtw.backend.domain.group.dto.response.SimpleGroupInfoResponse; | ||
import com.twtw.backend.domain.group.entity.Group; | ||
import com.twtw.backend.domain.group.entity.GroupMember; | ||
import com.twtw.backend.domain.group.repository.GroupMemberRepository; | ||
import com.twtw.backend.domain.group.repository.GroupRepository; | ||
import com.twtw.backend.domain.member.entity.Member; | ||
import com.twtw.backend.domain.member.repository.MemberRepository; | ||
import com.twtw.backend.fixture.group.GroupEntityFixture; | ||
import com.twtw.backend.fixture.member.MemberEntityFixture; | ||
import com.twtw.backend.support.service.LoginTest; | ||
import jakarta.persistence.EntityManager; | ||
import org.junit.jupiter.api.DisplayName; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
@DisplayName("GroupService의") | ||
public class GroupServiceTest extends LoginTest { | ||
@Autowired private GroupService groupService; | ||
|
||
@Autowired private GroupRepository groupRepository; | ||
|
||
@Autowired private MemberRepository memberRepository; | ||
|
||
@Autowired private GroupMemberRepository groupMemberRepository; | ||
|
||
@Autowired private EntityManager em; | ||
|
||
@Test | ||
@DisplayName("makeGroup이 성공적으로 수행되는가") | ||
void makeGroup(){ | ||
// given | ||
MakeGroupRequest request = new MakeGroupRequest("JINJOOONEKING","JIN_GROUP_IMAGE"); | ||
|
||
// when | ||
GroupInfoResponse response = groupService.makeGroup(request); | ||
|
||
// then | ||
assertThat(response.getName()).isEqualTo("JINJOOONEKING"); | ||
} | ||
|
||
@Test | ||
@DisplayName("Group에 Join할 수 있는가") | ||
void joinGroup(){ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters