-
Notifications
You must be signed in to change notification settings - Fork 2
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
f98e1b7
commit 94c1e02
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
src/test/java/likelion/MZConnent/service/culture/CultureCategoryServiceTest.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,47 @@ | ||
package likelion.MZConnent.service.culture; | ||
|
||
import likelion.MZConnent.dto.culture.response.CultureCategoryResponse; | ||
import likelion.MZConnent.dto.culture.response.CultureDetailResponse; | ||
import likelion.MZConnent.repository.member.MemberRepository; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
|
||
@Slf4j | ||
@SpringBootTest | ||
class CultureCategoryServiceTest { | ||
@Autowired | ||
CultureCategoryService cultureCategoryService; | ||
|
||
@Autowired | ||
MemberRepository memberRepository; | ||
|
||
@Autowired | ||
CultureService cultureService; | ||
|
||
@Test | ||
public void getCultureCategory() throws Exception { | ||
//given | ||
|
||
//when | ||
CultureCategoryResponse all = cultureCategoryService.getAllCultureCategories(); | ||
|
||
//then | ||
Assertions.assertEquals(all.getCultureCategories().size(), 5); | ||
} | ||
|
||
@Test | ||
public void getCultureDetailInfo() throws Exception { | ||
//given | ||
Long cultureId = 1L; | ||
|
||
//when | ||
CultureDetailResponse cultureDetailInfo = cultureService.getCultureDetailInfo(cultureId); | ||
|
||
//then | ||
log.info("문화: {}", cultureDetailInfo); | ||
Assertions.assertEquals(cultureDetailInfo.getCultureId(), 1L); | ||
} | ||
} |