mirror of https://github.com/usbharu/Hideout.git
test: テストも修正
This commit is contained in:
parent
309ea569e8
commit
96d51a885f
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue