dion 02/05/22 02:48:29
Modified: src/java/org/apache/maven/struts Action.java
src/test/org/apache/maven/struts ActionTest.java
Log:
Added path property
Revision Changes Path
1.2 +19 -1
jakarta-turbine-maven/src/java/org/apache/maven/struts/Action.java
Index: Action.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/struts/Action.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Action.java 22 May 2002 09:02:17 -0000 1.1
+++ Action.java 22 May 2002 09:48:29 -0000 1.2
@@ -59,7 +59,7 @@
* configuration file
*
* @author dion
- * @version $Id: Action.java,v 1.1 2002/05/22 09:02:17 dion Exp $
+ * @version $Id: Action.java,v 1.2 2002/05/22 09:48:29 dion Exp $
*/
public class Action
{
@@ -69,6 +69,8 @@
/** Unique identifier of the form bean, if any, associated with the action
*/
private String name;
+ /** context relative path of the submitted request */
+ private String path;
/** "request" or "session" - scope of the form bean for the action */
private String scope;
/** Fully qualified Java class name of the implementation class */
@@ -177,6 +179,22 @@
public void setValidate(String validate)
{
this.validate = validate;
+ }
+
+ /** Getter for property path.
+ * @return Value of property path.
+ */
+ public String getPath()
+ {
+ return path;
+ }
+
+ /** Setter for property path.
+ * @param path New value of property path.
+ */
+ public void setPath(String path)
+ {
+ this.path = path;
}
}
1.2 +13 -1
jakarta-turbine-maven/src/test/org/apache/maven/struts/ActionTest.java
Index: ActionTest.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/test/org/apache/maven/struts/ActionTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ActionTest.java 22 May 2002 09:02:17 -0000 1.1
+++ ActionTest.java 22 May 2002 09:48:29 -0000 1.2
@@ -59,7 +59,7 @@
/**
* Unit tests for {@link Action}
* @author dion
- * @version $Id: ActionTest.java,v 1.1 2002/05/22 09:02:17 dion Exp $
+ * @version $Id: ActionTest.java,v 1.2 2002/05/22 09:48:29 dion Exp $
*/
public class ActionTest extends TestCase
{
@@ -119,6 +119,18 @@
instance.setName(name);
assertEquals("Name property setter or getter failed", name,
instance.getName());
+ }
+
+ /** test the name property is working
+ * @throws Exception when any error occurs
+ */
+ public void testPath() throws Exception
+ {
+ testConstructor();
+ String path = "/dummy";
+ instance.setPath(path);
+ assertEquals("Path property setter or getter failed", path,
+ instance.getPath());
}
/** test the scope property is working
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>