forked from eugenp/tutorials
-
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.
* Modifications to model on Hibernate One to manyTutorial * Modifications to model on Hibernate One to manyTutorial * Modifications to model on Hibernate One to manyTutorial * Simple Genetic Algorithm improvements * Struts2 refactoring
- Loading branch information
Showing
11 changed files
with
57 additions
and
58 deletions.
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
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 |
---|---|---|
@@ -1,16 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="http://java.sun.com/xml/ns/javaee" | ||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" | ||
id="WebApp_ID" version="3.0"> | ||
<display-name>MyStrutsApp</display-name> | ||
<filter> | ||
<filter-name>struts2</filter-name> | ||
<filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class> | ||
</filter> | ||
|
||
<filter-mapping> | ||
<filter-name>struts2</filter-name> | ||
<url-pattern>/*</url-pattern> | ||
</filter-mapping> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> | ||
<display-name>struts</display-name> | ||
<filter> | ||
<filter-name>struts2</filter-name> | ||
<filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class> | ||
</filter> | ||
<filter-mapping> | ||
<filter-name>struts2</filter-name> | ||
<url-pattern>/*</url-pattern> | ||
</filter-mapping> | ||
</web-app> |
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 was deleted.
Oops, something went wrong.
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
File renamed without changes.
29 changes: 29 additions & 0 deletions
29
struts2/src/test/java/com/baeldung/struts/test/CarActionTest.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,29 @@ | ||
//package com.baeldung.struts.test; | ||
// | ||
//import org.apache.struts2.StrutsTestCase; | ||
//import org.junit.Test; | ||
// | ||
//import com.baeldung.struts.CarAction; | ||
//import com.opensymphony.xwork2.ActionProxy; | ||
// | ||
//public class CarActionTest extends StrutsTestCase { | ||
// | ||
// public void testgivenCarOptions_WhenferrariSelected_ThenShowMessage() throws Exception { | ||
// request.setParameter("carName", "ferrari"); | ||
// ActionProxy proxy = getActionProxy("/tutorial/car.action"); | ||
// CarAction carAction = (CarAction) proxy.getAction(); | ||
// String result = proxy.execute(); | ||
// assertEquals(result, "success"); | ||
// assertEquals(carAction.getCarMessage(), "Ferrari Fan!"); | ||
// } | ||
// | ||
// public void testgivenCarOptions_WhenbmwSelected_ThenShowMessage() throws Exception { | ||
// request.setParameter("carName", "bmw"); | ||
// ActionProxy proxy = getActionProxy("/tutorial/car.action"); | ||
// CarAction carAction = (CarAction) proxy.getAction(); | ||
// String result = proxy.execute(); | ||
// assertEquals(result, "success"); | ||
// assertEquals(carAction.getCarMessage(), "BMW Fan!"); | ||
// } | ||
// | ||
//} |