-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fcc9591
commit bd647bf
Showing
5 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package jp.dogrun.ileaflet.controller; | ||
|
||
import org.slim3.controller.Controller; | ||
import org.slim3.controller.Navigation; | ||
|
||
public class IndexController extends Controller { | ||
|
||
@Override | ||
public Navigation run() throws Exception { | ||
return forward("index.jsp"); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
test/jp/dogrun/ileaflet/controller/IndexControllerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package jp.dogrun.ileaflet.controller; | ||
|
||
import org.slim3.tester.ControllerTestCase; | ||
import org.junit.Test; | ||
import static org.junit.Assert.*; | ||
import static org.hamcrest.CoreMatchers.*; | ||
|
||
public class IndexControllerTest extends ControllerTestCase { | ||
|
||
@Test | ||
public void run() throws Exception { | ||
tester.start("/index"); | ||
IndexController controller = tester.getController(); | ||
assertThat(controller, is(notNullValue())); | ||
assertThat(tester.isRedirect(), is(false)); | ||
assertThat(tester.getDestinationPath(), is("/index.jsp")); | ||
} | ||
} |
Binary file added
BIN
+591 Bytes
war/WEB-INF/classes/jp/dogrun/ileaflet/controller/IndexController.class
Binary file not shown.
Binary file added
BIN
+1.38 KB
war/WEB-INF/classes/jp/dogrun/ileaflet/controller/IndexControllerTest.class
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<%@page pageEncoding="UTF-8" isELIgnored="false" session="false"%> | ||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | ||
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> | ||
<%@taglib prefix="f" uri="http://www.slim3.org/functions"%> | ||
|
||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | ||
<title>Index</title> | ||
</head> | ||
<body> | ||
<p>Hello Index !!!</p> | ||
</body> | ||
</html> |