test: テストも修正

This commit is contained in:
usbharu 2024-09-22 11:43:19 +09:00
parent 309ea569e8
commit 96d51a885f
Signed by: usbharu
GPG Key ID: 95CBCF7046307B77
4 changed files with 8 additions and 8 deletions

View File

@ -22,7 +22,7 @@ import org.mockito.kotlin.doReturn
import org.mockito.kotlin.eq import org.mockito.kotlin.eq
import org.mockito.kotlin.whenever import org.mockito.kotlin.whenever
import utils.TestTransaction import utils.TestTransaction
import java.net.URL import java.net.URI
@ExtendWith(MockitoExtension::class) @ExtendWith(MockitoExtension::class)
class RegisterLocalActorApplicationServiceTest { class RegisterLocalActorApplicationServiceTest {
@ -51,7 +51,7 @@ class RegisterLocalActorApplicationServiceTest {
val transaction = TestTransaction val transaction = TestTransaction
@Spy @Spy
val applicationConfig = ApplicationConfig(URL("http://example.com")) val applicationConfig = ApplicationConfig(URI.create("http://example.com"))
@Spy @Spy
val idGenerateService = TwitterSnowflakeIdGenerateService val idGenerateService = TwitterSnowflakeIdGenerateService

View File

@ -15,7 +15,7 @@ class RemoteActorCheckDomainServiceTest {
val remoteActor = RemoteActorCheckDomainService( val remoteActor = RemoteActorCheckDomainService(
ApplicationConfig( ApplicationConfig(
URI.create("https://local.example.com").toURL() URI.create("https://local.example.com")
) )
).isRemoteActor( ).isRemoteActor(
actor actor
@ -30,7 +30,7 @@ class RemoteActorCheckDomainServiceTest {
val localActor = RemoteActorCheckDomainService( val localActor = RemoteActorCheckDomainService(
ApplicationConfig( ApplicationConfig(
URI.create("https://local.example.com").toURL() URI.create("https://local.example.com")
) )
).isRemoteActor( ).isRemoteActor(
actor actor

View File

@ -15,7 +15,7 @@ import org.mockito.junit.jupiter.MockitoExtension
import org.mockito.kotlin.doReturn import org.mockito.kotlin.doReturn
import org.mockito.kotlin.eq import org.mockito.kotlin.eq
import org.mockito.kotlin.whenever import org.mockito.kotlin.whenever
import java.net.URL import java.net.URI
@ExtendWith(MockitoExtension::class) @ExtendWith(MockitoExtension::class)
class LocalActorDomainServiceImplTest { class LocalActorDomainServiceImplTest {
@ -26,7 +26,7 @@ class LocalActorDomainServiceImplTest {
lateinit var actorRepository: ActorRepository lateinit var actorRepository: ActorRepository
@Spy @Spy
val applicationConfig = ApplicationConfig(URL("http://example.com")) val applicationConfig = ApplicationConfig(URI.create("http://example.com"))
@Test @Test
fun findByNameAndDomainがnullならfalse() = runTest { fun findByNameAndDomainがnullならfalse() = runTest {

View File

@ -19,7 +19,7 @@ import org.mockito.junit.jupiter.MockitoExtension
import org.mockito.kotlin.* import org.mockito.kotlin.*
import org.springframework.security.core.userdetails.UsernameNotFoundException import org.springframework.security.core.userdetails.UsernameNotFoundException
import utils.TestTransaction import utils.TestTransaction
import java.net.URL import java.net.URI
import kotlin.test.assertEquals import kotlin.test.assertEquals
@ExtendWith(MockitoExtension::class) @ExtendWith(MockitoExtension::class)
@ -34,7 +34,7 @@ class UserDetailsServiceImplTest {
lateinit var userDetailRepository: UserDetailRepository lateinit var userDetailRepository: UserDetailRepository
@Spy @Spy
val applicationConfig = ApplicationConfig(URL("http://example.com")) val applicationConfig = ApplicationConfig(URI.create("http://example.com"))
@Spy @Spy
val transaction = TestTransaction val transaction = TestTransaction