diff options
Diffstat (limited to 'juick-www/src')
-rw-r--r-- | juick-www/src/main/java/com/juick/Application.java | 7 | ||||
-rw-r--r-- | juick-www/src/test/java/com/juick/WebAppTests.java | 15 |
2 files changed, 3 insertions, 19 deletions
diff --git a/juick-www/src/main/java/com/juick/Application.java b/juick-www/src/main/java/com/juick/Application.java index 586c3e59..cb132ae9 100644 --- a/juick-www/src/main/java/com/juick/Application.java +++ b/juick-www/src/main/java/com/juick/Application.java @@ -1,9 +1,5 @@ package com.juick; -import com.juick.server.CommandsManager; -import com.juick.server.XMPPConnection; -import com.juick.server.XMPPServer; -import com.juick.server.xmpp.router.XMPPRouter; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; @@ -23,7 +19,6 @@ public class Application extends SpringBootServletInitializer { } public static void main(String[] args) { - SpringApplication.run(new Class[]{ Application.class, XMPPRouter.class, XMPPServer.class, - XMPPConnection.class, CommandsManager.class }, args); + SpringApplication.run(Application.class, args); } } diff --git a/juick-www/src/test/java/com/juick/WebAppTests.java b/juick-www/src/test/java/com/juick/WebAppTests.java index 8c475a62..3d8fd031 100644 --- a/juick-www/src/test/java/com/juick/WebAppTests.java +++ b/juick-www/src/test/java/com/juick/WebAppTests.java @@ -23,10 +23,6 @@ import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.css.StyleElement; import com.gargoylesoftware.htmlunit.html.DomElement; import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.juick.server.CommandsManager; -import com.juick.server.XMPPConnection; -import com.juick.server.XMPPServer; -import com.juick.server.xmpp.router.XMPPRouter; import com.juick.service.*; import com.juick.util.MessageUtils; import com.juick.www.WebApp; @@ -74,8 +70,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ @RunWith(SpringRunner.class) @AutoConfigureMockMvc -@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT, classes = { Application.class, XMPPRouter.class, XMPPServer.class, - XMPPConnection.class, CommandsManager.class }) +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT, classes = { Application.class}) public class WebAppTests { @MockBean private ImagesService imagesService; @@ -97,12 +92,6 @@ public class WebAppTests { private JdbcTemplate jdbcTemplate; @Inject private SubscriptionService subscriptionService; - @Inject - private XMPPServer xmpp; - @Inject - private XMPPConnection routerConnection; - @Inject - private XMPPRouter xmppRouter; @Inject private PebbleEngine pebbleEngine; @@ -244,7 +233,7 @@ public class WebAppTests { } @Test public void postMessageTests() throws Exception { - assertThat(xmpp.getInConnections().size(), is(0)); + //assertThat(xmpp.getInConnections().size(), is(0)); mockMvc.perform(post("/post2").param("body", "yo")).andExpect(redirectedUrl("http://localhost/login")); MvcResult loginResult = mockMvc.perform(post("/login") .param("username", ugnichName) |