Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FetchRecipeDeatil의 비즈니스 로직을 테스트 해보았습니다. #16

Merged
merged 11 commits into from
Jul 23, 2024
7 changes: 7 additions & 0 deletions HomeCafeRecipes/HomeCafeRecipes/Domain/Entities/Recipe.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,10 @@ struct Recipe {
let likeCount: Int
let createdAt: Date
}

extension Recipe {

static func dummy() -> Recipe {
.init(id: 1, type: .coffee, name: "", description: "", writer: .init(id: 1, profileImage: "", nickname: "", createdAt: Date()), imageUrls: [], isLikedByCurrentUser: false, likeCount: 0, createdAt: Date())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

라인수가 길어지는 경우, 줄바꿈 해주세요.
또 이런 init 단계에 파라미터를 넣어주는 코드 같은 경우에는 언제든지 확장되어 길어질 수 있으니 줄바꿈을 하면서 작성하는게 좋아요. 앞으로 줄바꿈 같은 코드 스타일 코멘트는 줄여나가도록 더 신경써주시면 좋을 것 같아요.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[d7ab88c] 수정했습니다

}
}