-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…ed-place [refactor] #87 LikedPlaceRepoTest, PlaceRepoTest에 인메모리 db를 사용하도록 했어요
- Loading branch information
Showing
6 changed files
with
117 additions
and
349 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
src/test/java/team7/inplace/config/annotation/CustomRepositoryTest.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,23 @@ | ||
package team7.inplace.config.annotation; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.test.context.TestPropertySource; | ||
|
||
@Target(ElementType.TYPE) // 클래스에 붙일 수 있도록 설정 | ||
@Retention(RetentionPolicy.RUNTIME) // 런타임에 유지 | ||
@SpringBootTest // SpringBootTest를 포함 | ||
@TestPropertySource(properties = { | ||
"spring.datasource.url=jdbc:h2:mem:testdb", | ||
"spring.datasource.driver-class-name=org.h2.Driver", | ||
"spring.datasource.username=sa", | ||
"spring.datasource.password=", | ||
"spring.jpa.hibernate.ddl-auto=create-drop", | ||
"spring.sql.init.mode=never" | ||
}) | ||
public @interface CustomRepositoryTest { | ||
|
||
} |
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
Oops, something went wrong.