-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#160] test: PostServiceTest 단위테스트로 변경
- Loading branch information
1 parent
b1e8518
commit 5120240
Showing
2 changed files
with
248 additions
and
367 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.mallang.post; | ||
|
||
import com.mallang.blog.domain.Blog; | ||
import com.mallang.post.domain.draft.Draft; | ||
import java.util.Collections; | ||
import org.springframework.test.util.ReflectionTestUtils; | ||
|
||
public class DraftFixture { | ||
|
||
public static Draft draft(Long id, Blog blog) { | ||
Draft draft = new Draft( | ||
blog, | ||
"title", | ||
"intro", | ||
"content", | ||
null, | ||
null, | ||
Collections.emptyList(), | ||
blog.getOwner() | ||
); | ||
ReflectionTestUtils.setField(draft, "id", 1L); | ||
return draft; | ||
} | ||
} |
Oops, something went wrong.