From 1b98f09115791bda02bd66e2a99ed7ce87c431fe Mon Sep 17 00:00:00 2001 From: Tim <135014430+nagisa77@users.noreply.github.com> Date: Wed, 30 Jul 2025 16:24:09 +0800 Subject: [PATCH] Fix duplicate ReactionRepository variables --- .../java/com/openisle/service/NotificationServiceTest.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/test/java/com/openisle/service/NotificationServiceTest.java b/src/test/java/com/openisle/service/NotificationServiceTest.java index 30c68b1ba..59d43d5e4 100644 --- a/src/test/java/com/openisle/service/NotificationServiceTest.java +++ b/src/test/java/com/openisle/service/NotificationServiceTest.java @@ -5,7 +5,6 @@ import com.openisle.repository.NotificationRepository; import com.openisle.repository.UserRepository; import com.openisle.repository.ReactionRepository; import com.openisle.service.PushNotificationService; -import com.openisle.repository.ReactionRepository; import java.util.concurrent.Executor; import org.junit.jupiter.api.Test; import org.mockito.Mockito; @@ -25,7 +24,6 @@ class NotificationServiceTest { ReactionRepository rRepo = mock(ReactionRepository.class); EmailSender email = mock(EmailSender.class); PushNotificationService push = mock(PushNotificationService.class); - ReactionRepository rRepo = mock(ReactionRepository.class); Executor executor = Runnable::run; NotificationService service = new NotificationService(nRepo, uRepo, email, push, rRepo, executor); org.springframework.test.util.ReflectionTestUtils.setField(service, "websiteUrl", "https://ex.com"); @@ -57,7 +55,6 @@ class NotificationServiceTest { ReactionRepository rRepo = mock(ReactionRepository.class); EmailSender email = mock(EmailSender.class); PushNotificationService push = mock(PushNotificationService.class); - ReactionRepository rRepo = mock(ReactionRepository.class); Executor executor = Runnable::run; NotificationService service = new NotificationService(nRepo, uRepo, email, push, rRepo, executor); org.springframework.test.util.ReflectionTestUtils.setField(service, "websiteUrl", "https://ex.com"); @@ -83,7 +80,6 @@ class NotificationServiceTest { ReactionRepository rRepo = mock(ReactionRepository.class); EmailSender email = mock(EmailSender.class); PushNotificationService push = mock(PushNotificationService.class); - ReactionRepository rRepo = mock(ReactionRepository.class); Executor executor = Runnable::run; NotificationService service = new NotificationService(nRepo, uRepo, email, push, rRepo, executor); org.springframework.test.util.ReflectionTestUtils.setField(service, "websiteUrl", "https://ex.com"); @@ -107,7 +103,6 @@ class NotificationServiceTest { ReactionRepository rRepo = mock(ReactionRepository.class); EmailSender email = mock(EmailSender.class); PushNotificationService push = mock(PushNotificationService.class); - ReactionRepository rRepo = mock(ReactionRepository.class); Executor executor = Runnable::run; NotificationService service = new NotificationService(nRepo, uRepo, email, push, rRepo, executor); org.springframework.test.util.ReflectionTestUtils.setField(service, "websiteUrl", "https://ex.com"); @@ -132,7 +127,6 @@ class NotificationServiceTest { ReactionRepository rRepo = mock(ReactionRepository.class); EmailSender email = mock(EmailSender.class); PushNotificationService push = mock(PushNotificationService.class); - ReactionRepository rRepo = mock(ReactionRepository.class); Executor executor = Runnable::run; NotificationService service = new NotificationService(nRepo, uRepo, email, push, rRepo, executor); org.springframework.test.util.ReflectionTestUtils.setField(service, "websiteUrl", "https://ex.com"); @@ -157,7 +151,6 @@ class NotificationServiceTest { ReactionRepository rRepo = mock(ReactionRepository.class); EmailSender email = mock(EmailSender.class); PushNotificationService push = mock(PushNotificationService.class); - ReactionRepository rRepo = mock(ReactionRepository.class); Executor executor = Runnable::run; NotificationService service = new NotificationService(nRepo, uRepo, email, push, rRepo, executor); org.springframework.test.util.ReflectionTestUtils.setField(service, "websiteUrl", "https://ex.com");