Skip to content

Commit 9745e03

Browse files
committed
[refactor] code review 반영
1 parent e19bab1 commit 9745e03

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

authentication-service/src/test/kotlin/com/expedia/authentication/acceptance/user/UserSteps.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ internal fun `회원 생성 요청`(email: String, password: String): Extractabl
1212
val params: MutableMap<String, String> = HashMap()
1313
params["email"] = email
1414
params["password"] = password
15+
1516
return RestAssured
1617
.given().log().all()
1718
.contentType(MediaType.APPLICATION_JSON_VALUE)

authentication-service/src/test/kotlin/com/expedia/authentication/support/DatabaseCleanup.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.expedia.authentication.support
22

33
import com.google.common.base.CaseFormat
4-
import org.springframework.beans.factory.InitializingBean
54
import org.springframework.stereotype.Service
5+
import javax.annotation.PostConstruct
66
import javax.persistence.Entity
77
import javax.persistence.EntityManager
88
import javax.persistence.PersistenceContext
@@ -11,11 +11,12 @@ import javax.transaction.Transactional
1111
@Service
1212
class DatabaseCleanup(
1313
@PersistenceContext val entityManager: EntityManager
14-
): InitializingBean {
14+
) {
1515

1616
private var tableNames: List<String>? = null
1717

18-
override fun afterPropertiesSet() {
18+
@PostConstruct
19+
fun afterPropertiesSet() {
1920
tableNames = entityManager.metamodel.entities.asSequence()
2021
.filter { e -> e.javaType.getAnnotation(Entity::class.java) != null }
2122
.map { e -> CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, e.name) }

0 commit comments

Comments
 (0)