aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--juick-server/build.gradle11
-rw-r--r--juick-xmpp-wip/build.gradle2
-rw-r--r--juick-xmpp-wip/src/main/java/com/juick/components/configuration/BotAppConfiguration.java2
-rw-r--r--juick-xmpp-wip/src/test/java/com/juick/xmpp/XMPPTests.java10
4 files changed, 21 insertions, 4 deletions
diff --git a/juick-server/build.gradle b/juick-server/build.gradle
index 5710ef21..8d894913 100644
--- a/juick-server/build.gradle
+++ b/juick-server/build.gradle
@@ -44,3 +44,14 @@ gretty {
configurations {
all*.exclude module: 'commons-logging'
}
+
+configurations {
+ testArtifacts.extendsFrom testRuntime
+}
+task testJar(type: Jar) {
+ classifier "test"
+ from sourceSets.test.output
+}
+artifacts {
+ testArtifacts testJar
+}
diff --git a/juick-xmpp-wip/build.gradle b/juick-xmpp-wip/build.gradle
index 65d84755..cc69ed34 100644
--- a/juick-xmpp-wip/build.gradle
+++ b/juick-xmpp-wip/build.gradle
@@ -8,7 +8,7 @@ dependencies {
compile project(':juick-server')
testCompile project(path: ':juick-core', configuration: 'testArtifacts')
- testCompile project(path: ':juick-server-web', configuration: 'testArtifacts')
+ testCompile project(path: ':juick-server', configuration: 'testArtifacts')
testCompile project(path: ':juick-server-jdbc', configuration: 'testArtifacts')
testCompile ('net.sourceforge.htmlunit:htmlunit:2.29')
}
diff --git a/juick-xmpp-wip/src/main/java/com/juick/components/configuration/BotAppConfiguration.java b/juick-xmpp-wip/src/main/java/com/juick/components/configuration/BotAppConfiguration.java
index 1de0a696..0e3cd5c1 100644
--- a/juick-xmpp-wip/src/main/java/com/juick/components/configuration/BotAppConfiguration.java
+++ b/juick-xmpp-wip/src/main/java/com/juick/components/configuration/BotAppConfiguration.java
@@ -30,7 +30,7 @@ import javax.inject.Inject;
* Created by aalexeev on 11/12/16.
*/
@Configuration
-@ComponentScan(basePackages = {"com.juick.components.controllers"})
+@ComponentScan(basePackages = {"com.juick.components"})
@PropertySource("classpath:juick.conf")
@Import(BaseWebConfiguration.class)
public class BotAppConfiguration extends WebMvcConfigurationSupport {
diff --git a/juick-xmpp-wip/src/test/java/com/juick/xmpp/XMPPTests.java b/juick-xmpp-wip/src/test/java/com/juick/xmpp/XMPPTests.java
index 1f7107bf..3e8961bb 100644
--- a/juick-xmpp-wip/src/test/java/com/juick/xmpp/XMPPTests.java
+++ b/juick-xmpp-wip/src/test/java/com/juick/xmpp/XMPPTests.java
@@ -19,10 +19,12 @@ package com.juick.xmpp;
import com.gargoylesoftware.htmlunit.WebClient;
import com.juick.components.XMPPRouter;
+import com.juick.components.configuration.BotAppConfiguration;
import com.juick.configuration.MockDataConfiguration;
import com.juick.server.XMPPConnection;
+import com.juick.server.configuration.ApiAppConfiguration;
import com.juick.server.configuration.BaseWebConfiguration;
-import com.juick.server.configuration.XmppAppConfiguration;
+import com.juick.service.MessengerService;
import com.juick.service.PrivacyQueriesService;
import com.juick.service.ShowQueriesService;
import org.junit.Before;
@@ -59,7 +61,7 @@ import static org.hamcrest.Matchers.equalTo;
public class XMPPTests {
@Configuration
@Import(value = {
- BaseWebConfiguration.class, XmppAppConfiguration.class, MockDataConfiguration.class
+ BotAppConfiguration.class, ApiAppConfiguration.class, MockDataConfiguration.class
})
static class Config {
@Bean
@@ -70,6 +72,10 @@ public class XMPPTests {
public PrivacyQueriesService privacyQueriesService() {
return Mockito.mock(PrivacyQueriesService.class);
}
+ @Bean
+ public MessengerService messengerService() {
+ return Mockito.mock(MessengerService.class);
+ }
}
@Inject