🔥
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -40,4 +40,5 @@ bin/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
logs/
|
||||
logs/
|
||||
Ttt*
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
package me.jiniworld.demohx.persistence
|
||||
|
||||
import com.ninjasquad.springmockk.MockkBean
|
||||
import me.jiniworld.demohx.config.BeanConfig
|
||||
import me.jiniworld.demohx.persistence.notice.NoticeRepository
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.springframework.beans.factory.annotation.Autowired
|
||||
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest
|
||||
import org.springframework.boot.test.context.SpringBootTest
|
||||
import org.springframework.context.annotation.Import
|
||||
import org.springframework.data.domain.PageRequest
|
||||
import org.springframework.data.domain.Sort
|
||||
import org.springframework.test.context.jdbc.Sql
|
||||
|
||||
//@DataJpaTest
|
||||
@SpringBootTest
|
||||
//@Import(value = [BeanConfig::class])
|
||||
//@Import(value = [NoticeRepository::class])
|
||||
//@Import([NoticePersistenceAdapter::class])
|
||||
internal class NoticePersistenceAdapterTest {
|
||||
@MockkBean
|
||||
private lateinit var noticeRepository: NoticeRepository
|
||||
// @Test
|
||||
// @Sql("NoticePersistenceAdapterTest.sql")
|
||||
// fun loadNoticesTest() {
|
||||
// val notices = noticePersistenceAdapter.loadNotices(PageRequest.of(0, 10, Sort.by(Sort.Order.desc("id"))))
|
||||
// print(notices)
|
||||
// }
|
||||
|
||||
@Test
|
||||
// @Sql("NoticePersistenceAdapterTest.sql")
|
||||
fun ttt() {
|
||||
print("zzz")
|
||||
val notices = noticeRepository.findAllBy(PageRequest.of(0, 10, Sort.by(Sort.Order.desc("id"))))
|
||||
print(notices)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
insert into notice(id, title, content, created_at) values (3, 'demo-hexagonal', 'hexagonal architecture 구조로 만든 코프링 웹 애플리케이션을 만들었습니다', now());
|
||||
insert into notice(id, title, content, created_at) values (4, 'demo-app 서브 모듈 프로젝트', '이번 프로젝트는 서브 모듈로 구성되어있습니다.', now());
|
||||
Reference in New Issue
Block a user