-
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.
[KAN-108] 리뷰 테스트 코드 (테스트 커버리지 100%) (#83)
- Loading branch information
1 parent
cec9434
commit 4164d5d
Showing
19 changed files
with
1,733 additions
and
677 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
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
8 changes: 2 additions & 6 deletions
8
src/main/kotlin/com/restaurant/be/review/presentation/dto/CreateReviewDto.kt
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
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
29 changes: 29 additions & 0 deletions
29
src/test/kotlin/com/restaurant/be/common/util/ReviewUtil.kt
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,29 @@ | ||
package com.restaurant.be.common.util | ||
|
||
import com.restaurant.be.review.domain.entity.Review | ||
import com.restaurant.be.review.domain.entity.ReviewImage | ||
import com.restaurant.be.user.domain.entity.User | ||
|
||
object ReviewUtil { | ||
fun generateReviewEntity( | ||
id: Long = 0, | ||
user: User, | ||
restaurantId: Long = 0, | ||
content: String = "default_content", | ||
rating: Double = 0.0, | ||
likeCount: Long = 0, | ||
viewCount: Long = 0, | ||
images: MutableList<ReviewImage> = mutableListOf() | ||
): Review { | ||
return Review( | ||
id = id, | ||
user = user, | ||
restaurantId = restaurantId, | ||
content = content, | ||
rating = rating, | ||
likeCount = likeCount, | ||
viewCount = viewCount, | ||
images = images | ||
) | ||
} | ||
} |
Oops, something went wrong.