Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
Paul-Christian Volkmer
ARSnova Backend
Commits
a5115fcc
Commit
a5115fcc
authored
10 years ago
by
Daniel Gerhardt
Browse files
Options
Downloads
Patches
Plain Diff
Remove obsolete tests
parent
22dee5af
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/de/thm/arsnova/controller/WelcomeControllerTest.java
+0
-71
0 additions, 71 deletions
...java/de/thm/arsnova/controller/WelcomeControllerTest.java
with
0 additions
and
71 deletions
src/test/java/de/thm/arsnova/controller/WelcomeControllerTest.java
deleted
100644 → 0
+
0
−
71
View file @
22dee5af
/*
* 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
());
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment