-
Notifications
You must be signed in to change notification settings - Fork 1
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
ansm6
committed
Feb 22, 2023
1 parent
84023b0
commit fdbe5bc
Showing
2 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
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
40 changes: 40 additions & 0 deletions
40
src/test/java/com/gaaji/auth/service/MannerRetriveServiceTest.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,40 @@ | ||
package com.gaaji.auth.service; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import java.util.List; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
|
||
import com.gaaji.auth.applicationservice.MannerRetriveService; | ||
import com.gaaji.auth.applicationservice.MannerRetriveServiceImpl; | ||
import com.gaaji.auth.domain.BadManner; | ||
import com.gaaji.auth.domain.GoodManner; | ||
|
||
public class MannerRetriveServiceTest { | ||
|
||
@Test | ||
void 매너리스트테스트() { | ||
MannerRetriveService mannerRetriveService = new MannerRetriveServiceImpl(); | ||
|
||
//good | ||
List<GoodManner> goodMannerList = mannerRetriveService.retriveGoodMannerList(); | ||
int i= 1; | ||
for(GoodManner goodManner: goodMannerList) { | ||
assertThat(goodManner.name()).isEqualTo("gm"+i); | ||
assertThat(goodManner.getMannerContents()).isEqualTo(GoodManner.valueOf("gm"+i).getMannerContents()); | ||
i++; | ||
} | ||
//bad | ||
|
||
List<BadManner> badMannerList = mannerRetriveService.retriveBadMannerList(); | ||
i= 1; | ||
for(BadManner badManner: badMannerList) { | ||
assertThat(badManner.name()).isEqualTo("bm"+i); | ||
assertThat(badManner.getMannerContents()).isEqualTo(BadManner.valueOf("bm"+i).getMannerContents()); | ||
i++; | ||
} | ||
} | ||
} |