-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
api/src/test/java/hexagonal/api/member/application/service/RegisterMemberServiceTest.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,39 @@ | ||
package hexagonal.api.member.application.service; | ||
|
||
import hexagonal.api.member.application.port.in.RegisterMemberCommand; | ||
import hexagonal.api.member.application.port.out.FindMemberPort; | ||
import hexagonal.api.member.application.port.out.SaveMemberPort; | ||
import org.junit.jupiter.api.DisplayName; | ||
import org.junit.jupiter.api.Test; | ||
import org.mockito.Mockito; | ||
|
||
import static org.assertj.core.api.Assertions.*; | ||
|
||
class RegisterMemberServiceTest { | ||
|
||
private final FindMemberPort findMemberPort = | ||
Mockito.mock(FindMemberPort.class); | ||
|
||
private final SaveMemberPort saveMemberPort = | ||
Mockito.mock(SaveMemberPort.class); | ||
|
||
RegisterMemberService registerMemberService = new RegisterMemberService(findMemberPort, saveMemberPort); | ||
|
||
@Test | ||
@DisplayName("회원가입 유스케이스 테스트") | ||
void 회원가입_테스트() { | ||
// given | ||
String name = "테스트_영준"; | ||
String email = "[email protected]"; | ||
String type = "USER"; | ||
|
||
RegisterMemberCommand command = new RegisterMemberCommand(name, email, type); | ||
|
||
// when | ||
Long memberId = registerMemberService.registerMember(command); | ||
|
||
// then | ||
assertThat(memberId).isEqualTo(-1L); | ||
} | ||
|
||
} |