-
Notifications
You must be signed in to change notification settings - Fork 4
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
f4e6f5b
commit 72e3755
Showing
3 changed files
with
27 additions
and
33 deletions.
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
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
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 |
---|---|---|
|
@@ -292,12 +292,20 @@ void findAllTest() throws Exception{ | |
|
||
@Test | ||
@Order(2) | ||
void findTest() throws Exception{ | ||
VideoResponse.VideoResponseDTO videoFind = videoService.findVideo(1); | ||
org.assertj.core.api.Assertions.assertThat(1) | ||
.isEqualTo(videoFind.getVideoID()); | ||
Assertions.assertThat("asdfasdf") | ||
.isEqualTo(videoFind.getSubtitles().get(0).getKorSubtitleContent()); | ||
void HistoryTest() throws Exception{ | ||
User user2 = User.builder() | ||
.email("[email protected]") | ||
.password("asdf1234!") | ||
.firstName("Jin") | ||
.lastName("Seung") | ||
.country("Korea") | ||
.age(21) | ||
.role(Role.MENTOR) | ||
.phone("010-0000-0000") | ||
.build(); | ||
|
||
userJPARepository.save(user2); | ||
VideoResponse.VideoResponseDTO videoFind = videoService.findVideo(3,user2); | ||
} | ||
|
||
@Test | ||
|
@@ -311,23 +319,13 @@ void findHistoryTest() throws Exception{ | |
@Test | ||
@Order(2) | ||
void findUserCategoryTest() throws Exception{ | ||
//List<VideoResponse.VideoAllResponseDTO> findUserCategory = videoService.findUserCategory(1); | ||
|
||
} | ||
|
||
@Test | ||
@Order(3) | ||
void addView() throws Exception{ | ||
videoService.addVideoView(1); | ||
VideoResponse.VideoResponseDTO videoFind = videoService.findVideo(1); | ||
org.assertj.core.api.Assertions.assertThat(26) | ||
.isEqualTo(videoFind.getViews()); | ||
List<VideoResponse.VideoAllResponseDTO> findUserCategory = videoService.findUserCategory(1); | ||
} | ||
|
||
@Test | ||
@Order(3) | ||
void findOmTest() throws Exception { | ||
List<VideoResponse.VideoAllResponseDTO> videoFind = videoService.findUserCategory(1); | ||
List<VideoResponse.VideoAllResponseDTO> videoFind = videoService.findHistoryVideo(0,2); | ||
|
||
String responseBody = om.writeValueAsString(videoFind); | ||
|
||
|