diff options
Diffstat (limited to 'juick-server/src/test/java')
-rw-r--r-- | juick-server/src/test/java/com/juick/server/tests/RSSTests.java | 61 |
1 files changed, 3 insertions, 58 deletions
diff --git a/juick-server/src/test/java/com/juick/server/tests/RSSTests.java b/juick-server/src/test/java/com/juick/server/tests/RSSTests.java index a5e05a08..6a19123b 100644 --- a/juick-server/src/test/java/com/juick/server/tests/RSSTests.java +++ b/juick-server/src/test/java/com/juick/server/tests/RSSTests.java @@ -20,7 +20,9 @@ package com.juick.server.tests; import com.juick.Message; import com.juick.Tag; import com.juick.User; +import com.juick.configuration.RepositoryConfiguration; import com.juick.server.configuration.ApiAppConfiguration; +import com.juick.server.configuration.ApiSecurityConfig; import com.juick.service.*; import org.apache.commons.text.RandomStringGenerator; import org.junit.Before; @@ -52,66 +54,9 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * Created by vitalyster on 13.12.2016. */ @RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration +@ContextConfiguration(classes = {ApiAppConfiguration.class, ApiSecurityConfig.class, RepositoryConfiguration.class}) @WebAppConfiguration public class RSSTests { - @Configuration - @Import(value = {ApiAppConfiguration.class}) - static class Config { - @Bean - @Primary - MessagesService messagesService() { - return Mockito.mock(MessagesService.class); - } - - @Bean - @Primary - UserService userService() { - return Mockito.mock(UserService.class); - } - - @Bean - @Primary - TagService tagService() { - return Mockito.mock(TagService.class); - } - @Bean - CrosspostService crosspostService() { - return Mockito.mock(CrosspostService.class); - } - @Bean - EmailService emailService() { - return Mockito.mock(EmailService.class); - } - @Bean - SubscriptionService subscriptionService() { - return Mockito.mock(SubscriptionService.class); - } - @Bean - MessengerService messengerService() { - return Mockito.mock(MessengerService.class); - } - @Bean - TelegramService telegramService() { - return Mockito.mock(TelegramService.class); - } - @Bean - PMQueriesService pmQueriesService() { - return Mockito.mock(PMQueriesService.class); - } - @Bean - ShowQueriesService showQueriesService() { - return Mockito.mock(ShowQueriesService.class); - } - @Bean - PrivacyQueriesService privacyQueriesService() { - return Mockito.mock(PrivacyQueriesService.class); - } - @Bean - PushQueriesService pushQueriesService() { - return Mockito.mock(PushQueriesService.class); - } - } private MockMvc mockMvc; @Inject |