diff --git a/src/test/java/de/thm/arsnova/controller/WelcomeControllerTest.java b/src/test/java/de/thm/arsnova/controller/WelcomeControllerTest.java deleted file mode 100644 index 35d3287b375e24ca4039d45dfafc72f1d86a594d..0000000000000000000000000000000000000000 --- a/src/test/java/de/thm/arsnova/controller/WelcomeControllerTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2012 THM webMedia - * - * This file is part of ARSnova. - * - * ARSnova is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * ARSnova is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -package de.thm.arsnova.controller; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import javax.inject.Inject; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationContext; -import org.springframework.mock.web.MockHttpServletRequest; -import org.springframework.mock.web.MockHttpServletResponse; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.web.servlet.HandlerAdapter; -import org.springframework.web.servlet.ModelAndView; -import org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(locations = { - "file:src/main/webapp/WEB-INF/spring/arsnova-servlet.xml", - "file:src/main/webapp/WEB-INF/spring/spring-main.xml", - "file:src/test/resources/test-config.xml" }) -public class WelcomeControllerTest { - - @Inject - private ApplicationContext applicationContext; - private MockHttpServletRequest request; - private MockHttpServletResponse response; - private HandlerAdapter handlerAdapter; - - @Autowired - private WelcomeController welcomeController; - - @Before - public final void setUp() { - this.request = new MockHttpServletRequest(); - this.response = new MockHttpServletResponse(); - handlerAdapter = applicationContext.getBean(AnnotationMethodHandlerAdapter.class); - } - - @Test - public void testIndexPage() throws Exception { - request.setMethod("GET"); - request.setRequestURI("/"); - - final ModelAndView mav = handlerAdapter.handle(request, response, welcomeController); - assertNotNull(mav); - assertEquals("redirect:/index.html", mav.getViewName()); - } -}