From 85337420cd0d9886414aff05f06eb2f0749fb94e Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:35:05 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=B8=8D=E8=A6=81=E3=81=AA?= =?UTF-8?q?=E4=BE=9D=E5=AD=98=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../usbharu/hideout/service/ap/APService.kt | 8 +-- .../hideout/service/ap/APServiceImplTest.kt | 65 ++++--------------- 2 files changed, 14 insertions(+), 59 deletions(-) diff --git a/src/main/kotlin/dev/usbharu/hideout/service/ap/APService.kt b/src/main/kotlin/dev/usbharu/hideout/service/ap/APService.kt index a1483b00..8ea18249 100644 --- a/src/main/kotlin/dev/usbharu/hideout/service/ap/APService.kt +++ b/src/main/kotlin/dev/usbharu/hideout/service/ap/APService.kt @@ -6,9 +6,6 @@ import com.fasterxml.jackson.module.kotlin.readValue import dev.usbharu.hideout.domain.model.ActivityPubResponse import dev.usbharu.hideout.domain.model.ap.Follow import dev.usbharu.hideout.exception.JsonParseException -import dev.usbharu.hideout.service.ap.job.APReceiveFollowJobService -import dev.usbharu.hideout.service.ap.job.ApNoteJobService -import dev.usbharu.hideout.service.ap.job.ApReactionJobService import org.slf4j.Logger import org.slf4j.LoggerFactory import org.springframework.beans.factory.annotation.Qualifier @@ -178,10 +175,7 @@ class APServiceImpl( private val apAcceptService: APAcceptService, private val apCreateService: APCreateService, private val apLikeService: APLikeService, - @Qualifier("activitypub") private val objectMapper: ObjectMapper, - private val apReceiveFollowJobService: APReceiveFollowJobService, - private val apNoteJobService: ApNoteJobService, - private val apReactionJobService: ApReactionJobService + @Qualifier("activitypub") private val objectMapper: ObjectMapper ) : APService { val logger: Logger = LoggerFactory.getLogger(APServiceImpl::class.java) diff --git a/src/test/kotlin/dev/usbharu/hideout/service/ap/APServiceImplTest.kt b/src/test/kotlin/dev/usbharu/hideout/service/ap/APServiceImplTest.kt index c3140427..e96cc491 100644 --- a/src/test/kotlin/dev/usbharu/hideout/service/ap/APServiceImplTest.kt +++ b/src/test/kotlin/dev/usbharu/hideout/service/ap/APServiceImplTest.kt @@ -16,10 +16,7 @@ class APServiceImplTest { apAcceptService = mock(), apCreateService = mock(), apLikeService = mock(), - objectMapper = objectMapper, - apReceiveFollowJobService = mock(), - apNoteJobService = mock(), - apReactionJobService = mock() + objectMapper = objectMapper ) //language=JSON @@ -36,10 +33,7 @@ class APServiceImplTest { apAcceptService = mock(), apCreateService = mock(), apLikeService = mock(), - objectMapper = objectMapper, - apReceiveFollowJobService = mock(), - apNoteJobService = mock(), - apReactionJobService = mock() + objectMapper = objectMapper ) //language=JSON @@ -56,10 +50,7 @@ class APServiceImplTest { apAcceptService = mock(), apCreateService = mock(), apLikeService = mock(), - objectMapper = objectMapper, - apReceiveFollowJobService = mock(), - apNoteJobService = mock(), - apReactionJobService = mock() + objectMapper = objectMapper ) //language=JSON @@ -76,10 +67,7 @@ class APServiceImplTest { apAcceptService = mock(), apCreateService = mock(), apLikeService = mock(), - objectMapper = objectMapper, - apReceiveFollowJobService = mock(), - apNoteJobService = mock(), - apReactionJobService = mock() + objectMapper = objectMapper ) //language=JSON @@ -96,10 +84,7 @@ class APServiceImplTest { apAcceptService = mock(), apCreateService = mock(), apLikeService = mock(), - objectMapper = objectMapper, - apReceiveFollowJobService = mock(), - apNoteJobService = mock(), - apReactionJobService = mock() + objectMapper = objectMapper ) //language=JSON @@ -116,10 +101,7 @@ class APServiceImplTest { apAcceptService = mock(), apCreateService = mock(), apLikeService = mock(), - objectMapper = objectMapper, - apReceiveFollowJobService = mock(), - apNoteJobService = mock(), - apReactionJobService = mock() + objectMapper = objectMapper ) //language=JSON @@ -136,10 +118,7 @@ class APServiceImplTest { apAcceptService = mock(), apCreateService = mock(), apLikeService = mock(), - objectMapper = objectMapper, - apReceiveFollowJobService = mock(), - apNoteJobService = mock(), - apReactionJobService = mock() + objectMapper = objectMapper ) //language=JSON @@ -156,10 +135,7 @@ class APServiceImplTest { apAcceptService = mock(), apCreateService = mock(), apLikeService = mock(), - objectMapper = objectMapper, - apReceiveFollowJobService = mock(), - apNoteJobService = mock(), - apReactionJobService = mock() + objectMapper = objectMapper ) //language=JSON @@ -176,10 +152,7 @@ class APServiceImplTest { apAcceptService = mock(), apCreateService = mock(), apLikeService = mock(), - objectMapper = objectMapper, - apReceiveFollowJobService = mock(), - apNoteJobService = mock(), - apReactionJobService = mock() + objectMapper = objectMapper ) //language=JSON @@ -196,10 +169,7 @@ class APServiceImplTest { apAcceptService = mock(), apCreateService = mock(), apLikeService = mock(), - objectMapper = objectMapper, - apReceiveFollowJobService = mock(), - apNoteJobService = mock(), - apReactionJobService = mock() + objectMapper = objectMapper ) //language=JSON @@ -216,10 +186,7 @@ class APServiceImplTest { apAcceptService = mock(), apCreateService = mock(), apLikeService = mock(), - objectMapper = objectMapper, - apReceiveFollowJobService = mock(), - apNoteJobService = mock(), - apReactionJobService = mock() + objectMapper = objectMapper ) //language=JSON @@ -236,10 +203,7 @@ class APServiceImplTest { apAcceptService = mock(), apCreateService = mock(), apLikeService = mock(), - objectMapper = objectMapper, - apReceiveFollowJobService = mock(), - apNoteJobService = mock(), - apReactionJobService = mock() + objectMapper = objectMapper ) //language=JSON @@ -256,10 +220,7 @@ class APServiceImplTest { apAcceptService = mock(), apCreateService = mock(), apLikeService = mock(), - objectMapper = objectMapper, - apReceiveFollowJobService = mock(), - apNoteJobService = mock(), - apReactionJobService = mock() + objectMapper = objectMapper ) //language=JSON