aboutsummaryrefslogtreecommitdiff
path: root/juick-server-jdbc/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server-jdbc/src/test/java')
-rw-r--r--juick-server-jdbc/src/test/java/com/juick/configuration/RepositoryConfiguration.java10
-rw-r--r--juick-server-jdbc/src/test/java/com/juick/service/MessageServiceTest.java9
2 files changed, 4 insertions, 15 deletions
diff --git a/juick-server-jdbc/src/test/java/com/juick/configuration/RepositoryConfiguration.java b/juick-server-jdbc/src/test/java/com/juick/configuration/RepositoryConfiguration.java
index eac98354..4541da94 100644
--- a/juick-server-jdbc/src/test/java/com/juick/configuration/RepositoryConfiguration.java
+++ b/juick-server-jdbc/src/test/java/com/juick/configuration/RepositoryConfiguration.java
@@ -19,23 +19,13 @@ package com.juick.configuration;
import com.juick.service.ImagesService;
import com.juick.service.MockImagesService;
-import com.juick.service.search.SearchService;
import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.DependsOn;
-import org.springframework.jdbc.core.JdbcTemplate;
-import org.springframework.jdbc.datasource.DriverManagerDataSource;
-
-import javax.sql.DataSource;
-import java.util.Collections;
-import java.util.List;
/**
* Created by aalexeev on 11/25/16.
*/
@Configuration
-@ComponentScan(basePackages = "com.juick.service")
public class RepositoryConfiguration {
@Bean
public ImagesService imagesService() {
diff --git a/juick-server-jdbc/src/test/java/com/juick/service/MessageServiceTest.java b/juick-server-jdbc/src/test/java/com/juick/service/MessageServiceTest.java
index d9f095ac..b082bfd1 100644
--- a/juick-server-jdbc/src/test/java/com/juick/service/MessageServiceTest.java
+++ b/juick-server-jdbc/src/test/java/com/juick/service/MessageServiceTest.java
@@ -26,18 +26,17 @@ import com.juick.server.helpers.AnonymousUser;
import com.juick.server.helpers.TagStats;
import com.juick.util.MessageUtils;
import org.apache.commons.lang3.StringUtils;
-import org.junit.*;
+import org.junit.Before;
+import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.junit4.SpringRunner;
import javax.inject.Inject;
import java.sql.Timestamp;
import java.time.Instant;
-import java.time.LocalDateTime;
-import java.time.ZoneId;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -50,7 +49,7 @@ import static org.junit.Assert.assertEquals;
/**
* Created by aalexeev on 11/25/16.
*/
-@RunWith(SpringJUnit4ClassRunner.class)
+@RunWith(SpringRunner.class)
@ContextConfiguration(classes = { DataConfiguration.class, RepositoryConfiguration.class })
public class MessageServiceTest extends AbstractJUnit4SpringContextTests {
@Inject