-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes in the template evaluation, consider the controller name
- Test of acceptance of get paths - Test if the template is been used as the default path - CHanges ins controller mapping - Consider controller class name as controller name
- Loading branch information
1 parent
f090524
commit bace902
Showing
11 changed files
with
116 additions
and
14 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
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
9 changes: 9 additions & 0 deletions
9
cloverx-acceptance/src/main/resources/templates/index/index.ftl
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,9 @@ | ||
<html> | ||
<head> | ||
<title>Index with Template</title> | ||
</head> | ||
<body> | ||
<h1 id="pageTitle">Index with template</h1> | ||
<br/> | ||
</body> | ||
</html> |
57 changes: 57 additions & 0 deletions
57
...cceptance/src/test/java/org/esmerilprogramming/cloverxacceptance/GetRoutesAcceptance.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,57 @@ | ||
package org.esmerilprogramming.cloverxacceptance; | ||
|
||
import org.esmerilprogramming.cloverxacceptance.main.MainApp; | ||
import org.junit.*; | ||
import org.openqa.selenium.By; | ||
import org.openqa.selenium.WebDriver; | ||
import org.openqa.selenium.WebElement; | ||
import org.openqa.selenium.firefox.FirefoxDriver; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
/** | ||
* Created by efraimgentil<[email protected]> on 15/03/15. | ||
*/ | ||
public class GetRoutesAcceptance { | ||
|
||
WebDriver webDriver; | ||
static MainApp mainApp; | ||
|
||
@BeforeClass | ||
public static void initClass(){ | ||
mainApp = new MainApp(); | ||
mainApp.start(); | ||
} | ||
|
||
@AfterClass | ||
public static void finish(){ | ||
mainApp.stop(); | ||
} | ||
|
||
@Before | ||
public void initTest(){ | ||
webDriver = new FirefoxDriver(); | ||
} | ||
|
||
@After | ||
public void endTest(){ | ||
webDriver.quit(); | ||
} | ||
|
||
@Test | ||
public void doesGetIndexWithoutTemplatePage() throws InterruptedException{ | ||
webDriver.get("localhost:8080/acceptance/index/index"); | ||
String pageSource = webDriver.getPageSource(); | ||
assertTrue( pageSource.contains("GET - index/index")); | ||
} | ||
|
||
@Test | ||
public void doesGetINdexWithTemplatePage() throws InterruptedException{ | ||
webDriver.get("localhost:8080/acceptance/index/indexWithTemplate"); | ||
WebElement title = webDriver.findElement(By.id("pageTitle")); | ||
assertTrue("Index with template".equalsIgnoreCase(title.getText())); | ||
} | ||
|
||
|
||
|
||
} |
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
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
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
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
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
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
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