style: テストのスタイルを修正

This commit is contained in:
usbharu 2023-05-03 16:53:26 +09:00
parent 8c4e6f516b
commit 7e3edf90bd
3 changed files with 4 additions and 19 deletions

View File

@ -1,7 +0,0 @@
package dev.usbharu.hideout.routing
import dev.usbharu.hideout.service.IUserAuthService
import io.ktor.server.routing.*
fun Routing.login(userAuthService: IUserAuthService) {
}

View File

@ -211,7 +211,6 @@ class SecurityKtTest {
Config.configData = ConfigData(url = "https://localhost", objectMapper = jacksonObjectMapper())
val now = Instant.now()
val kid = UUID.randomUUID()
val token = JWT.create()
@ -231,7 +230,6 @@ class SecurityKtTest {
)
}
val readValue = Config.configData.objectMapper.readerFor(Map::class.java)
.readValue<MutableMap<String, Any>?>(
JsonWebKeyUtil.publicKeyToJwk(
@ -273,7 +271,6 @@ class SecurityKtTest {
Config.configData = ConfigData(url = "https://localhost", objectMapper = jacksonObjectMapper())
val now = Instant.now()
val kid = UUID.randomUUID()
val token = JWT.create()
@ -293,7 +290,6 @@ class SecurityKtTest {
)
}
val readValue = Config.configData.objectMapper.readerFor(Map::class.java)
.readValue<MutableMap<String, Any>?>(
JsonWebKeyUtil.publicKeyToJwk(
@ -333,7 +329,6 @@ class SecurityKtTest {
Config.configData = ConfigData(url = "https://localhost", objectMapper = jacksonObjectMapper())
val now = Instant.now()
val kid = UUID.randomUUID()
val token = JWT.create()
@ -353,7 +348,6 @@ class SecurityKtTest {
)
}
val readValue = Config.configData.objectMapper.readerFor(Map::class.java)
.readValue<MutableMap<String, Any>?>(
JsonWebKeyUtil.publicKeyToJwk(
@ -393,7 +387,6 @@ class SecurityKtTest {
Config.configData = ConfigData(url = "https://localhost", objectMapper = jacksonObjectMapper())
val now = Instant.now()
val kid = UUID.randomUUID()
val token = JWT.create()
@ -413,7 +406,6 @@ class SecurityKtTest {
)
}
val readValue = Config.configData.objectMapper.readerFor(Map::class.java)
.readValue<MutableMap<String, Any>?>(
JsonWebKeyUtil.publicKeyToJwk(
@ -453,7 +445,6 @@ class SecurityKtTest {
Config.configData = ConfigData(url = "https://localhost", objectMapper = jacksonObjectMapper())
val now = Instant.now()
val kid = UUID.randomUUID()
val token = JWT.create()
@ -472,7 +463,6 @@ class SecurityKtTest {
)
}
val readValue = Config.configData.objectMapper.readerFor(Map::class.java)
.readValue<MutableMap<String, Any>?>(
JsonWebKeyUtil.publicKeyToJwk(

View File

@ -42,7 +42,8 @@ class JwtServiceImplTest {
val metaService = mock<IMetaService> {
onBlocking { getJwtMeta() } doReturn Jwt(
kid,
Base64Util.encode(generateKeyPair.private.encoded), Base64Util.encode(generateKeyPair.public.encoded)
Base64Util.encode(generateKeyPair.private.encoded),
Base64Util.encode(generateKeyPair.public.encoded)
)
}
val refreshTokenRepository = mock<IJwtRefreshTokenRepository> {
@ -119,7 +120,8 @@ class JwtServiceImplTest {
val metaService = mock<IMetaService> {
onBlocking { getJwtMeta() } doReturn Jwt(
kid,
Base64Util.encode(generateKeyPair.private.encoded), Base64Util.encode(generateKeyPair.public.encoded)
Base64Util.encode(generateKeyPair.private.encoded),
Base64Util.encode(generateKeyPair.public.encoded)
)
}
val jwtService = JwtServiceImpl(metaService, refreshTokenRepository, userService)