-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #653 from woowacourse-teams/test/645-template-tag-…
…service SourceCodeService 테스트 추가
- Loading branch information
Showing
3 changed files
with
508 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
backend/src/test/java/codezap/fixture/SourceCodeFixture.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,16 @@ | ||
package codezap.fixture; | ||
|
||
import codezap.template.domain.SourceCode; | ||
import codezap.template.domain.Template; | ||
|
||
public class SourceCodeFixture { | ||
|
||
public static SourceCode get(Template template, int ordinal) { | ||
return new SourceCode( | ||
template, | ||
"file1.java", | ||
"content1", | ||
ordinal | ||
); | ||
} | ||
} |
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,38 @@ | ||
package codezap.global; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
|
||
import codezap.category.repository.CategoryRepository; | ||
import codezap.member.repository.MemberRepository; | ||
import codezap.tag.repository.TagRepository; | ||
import codezap.tag.repository.TemplateTagRepository; | ||
import codezap.template.repository.SourceCodeRepository; | ||
import codezap.template.repository.TemplateRepository; | ||
import codezap.template.repository.ThumbnailRepository; | ||
|
||
@SpringBootTest | ||
@DatabaseIsolation | ||
public class ServiceTest { | ||
|
||
@Autowired | ||
protected MemberRepository memberRepository; | ||
|
||
@Autowired | ||
protected CategoryRepository categoryRepository; | ||
|
||
@Autowired | ||
protected TemplateRepository templateRepository; | ||
|
||
@Autowired | ||
protected TagRepository tagRepository; | ||
|
||
@Autowired | ||
protected TemplateTagRepository templateTagRepository; | ||
|
||
@Autowired | ||
protected SourceCodeRepository sourceCodeRepository; | ||
|
||
@Autowired | ||
protected ThumbnailRepository thumbnailRepository; | ||
} |
Oops, something went wrong.