-
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.
- Loading branch information
1 parent
caa6f54
commit 6f65812
Showing
5 changed files
with
119 additions
and
28 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
41 changes: 41 additions & 0 deletions
41
src/test/java/in/koreatech/koin/fixture/CourseTypeFixture.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,41 @@ | ||
package in.koreatech.koin.fixture; | ||
|
||
import org.springframework.stereotype.Component; | ||
|
||
import in.koreatech.koin.domain.graduation.model.CourseType; | ||
import in.koreatech.koin.domain.graduation.repository.CourseTypeRepository; | ||
|
||
@Component | ||
@SuppressWarnings("NonAsciiCharacters") | ||
public class CourseTypeFixture { | ||
|
||
private final CourseTypeRepository courseTypeRepository; | ||
|
||
public CourseTypeFixture(CourseTypeRepository courseTypeRepository) { | ||
this.courseTypeRepository = courseTypeRepository; | ||
} | ||
|
||
public CourseType 전공_필수() { | ||
return courseTypeRepository.save( | ||
CourseType.builder() | ||
.name("전공 필수") | ||
.build() | ||
); | ||
} | ||
|
||
public CourseType HRD_필수() { | ||
return courseTypeRepository.save( | ||
CourseType.builder() | ||
.name("MSC 필수") | ||
.build() | ||
); | ||
} | ||
|
||
public CourseType 교양_필수() { | ||
return courseTypeRepository.save( | ||
CourseType.builder() | ||
.name("교양 필수") | ||
.build() | ||
); | ||
} | ||
} |
Oops, something went wrong.