struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [53/57] struts git commit: Merges xwork packages into struts
Date Wed, 17 Jun 2015 21:09:53 GMT
http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/java/com/opensymphony/xwork2/validator/validators/ShortRangeFieldValidatorTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/com/opensymphony/xwork2/validator/validators/ShortRangeFieldValidatorTest.java b/core/src/test/java/com/opensymphony/xwork2/validator/validators/ShortRangeFieldValidatorTest.java
new file mode 100644
index 0000000..0011ced
--- /dev/null
+++ b/core/src/test/java/com/opensymphony/xwork2/validator/validators/ShortRangeFieldValidatorTest.java
@@ -0,0 +1,76 @@
+package com.opensymphony.xwork2.validator.validators;
+
+import com.opensymphony.xwork2.XWorkTestCase;
+import com.opensymphony.xwork2.util.ValueStack;
+import com.opensymphony.xwork2.util.ValueStackFactory;
+import com.opensymphony.xwork2.validator.GenericValidatorContext;
+import com.opensymphony.xwork2.validator.ValidatorContext;
+
+public class ShortRangeFieldValidatorTest extends XWorkTestCase {
+
+    public void testPassValidation() throws Exception {
+        // given
+        ValidationAction action = prepareAction((short) 5);
+        ValidatorContext context = new GenericValidatorContext(action);
+        ShortRangeFieldValidator validator = prepareValidator(action, context);
+
+        // when
+        validator.validate(action);
+
+        // then
+        assertTrue(context.getFieldErrors().size() == 0);
+    }
+
+    public void testMinValidation() throws Exception {
+        // given
+        ValidationAction action = prepareAction((short) 1);
+        ValidatorContext context = new GenericValidatorContext(action);
+        ShortRangeFieldValidator validator = prepareValidator(action, context);
+
+        // when
+        validator.validate(action);
+
+        // then
+        assertTrue(context.getFieldErrors().size() == 1);
+        assertEquals("Max is 10, min is 2 but value is 1", context.getFieldErrors().get("shortRange").get(0));
+    }
+
+    public void testMaxValidation() throws Exception {
+        // given
+        ValidationAction action = prepareAction((short) 11);
+        ValidatorContext context = new GenericValidatorContext(action);
+        ShortRangeFieldValidator validator = prepareValidator(action, context);
+
+        // when
+        validator.validate(action);
+
+        // then
+        assertTrue(context.getFieldErrors().size() == 1);
+        assertEquals("Max is 10, min is 2 but value is 11", context.getFieldErrors().get("shortRange").get(0));
+    }
+
+    private ValidationAction prepareAction(short range) {
+        ValidationAction action = new ValidationAction();
+        action.setShortMaxValue((short) 10);
+        action.setShortMinValue((short) 2);
+        action.setShortRange(range);
+        return action;
+    }
+
+    private ShortRangeFieldValidator prepareValidator(ValidationAction action, ValidatorContext context) {
+        ValueStack valueStack = container.getInstance(ValueStackFactory.class).createValueStack();
+        valueStack.push(action);
+
+        ShortRangeFieldValidator validator = new ShortRangeFieldValidator();
+        validator.setValueStack(valueStack);
+
+        validator.setMaxExpression("${shortMaxValue}");
+        validator.setMinExpression("${shortMinValue}");
+        validator.setValidatorContext(context);
+        validator.setFieldName("shortRange");
+        validator.setDefaultMessage("Max is ${shortMaxValue}, min is ${shortMinValue} but value is ${shortRange}");
+
+        return validator;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/java/com/opensymphony/xwork2/validator/validators/ValidationAction.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/com/opensymphony/xwork2/validator/validators/ValidationAction.java b/core/src/test/java/com/opensymphony/xwork2/validator/validators/ValidationAction.java
new file mode 100644
index 0000000..268288f
--- /dev/null
+++ b/core/src/test/java/com/opensymphony/xwork2/validator/validators/ValidationAction.java
@@ -0,0 +1,136 @@
+package com.opensymphony.xwork2.validator.validators;
+
+import java.util.Date;
+
+public class ValidationAction {
+
+    private Integer intRange;
+    private Integer intMinValue;
+    private Integer intMaxValue;
+
+    private Short shortRange;
+    private Short shortMinValue;
+    private Short shortMaxValue;
+
+    private Long longRange;
+    private Long longMinValue;
+    private Long longMaxValue;
+
+    private Date dateRange;
+    private Date dateMinValue;
+    private Date dateMaxValue;
+    private String dateFormat;
+    private String stringValue;
+
+    public Integer getIntRange() {
+        return intRange;
+    }
+
+    public void setIntRange(Integer intRange) {
+        this.intRange = intRange;
+    }
+
+    public Integer getIntMinValue() {
+        return intMinValue;
+    }
+
+    public void setIntMinValue(Integer intMinValue) {
+        this.intMinValue = intMinValue;
+    }
+
+    public Integer getIntMaxValue() {
+        return intMaxValue;
+    }
+
+    public void setIntMaxValue(Integer intMaxValue) {
+        this.intMaxValue = intMaxValue;
+    }
+
+    public Short getShortRange() {
+        return shortRange;
+    }
+
+    public void setShortRange(Short shortRange) {
+        this.shortRange = shortRange;
+    }
+
+    public Short getShortMinValue() {
+        return shortMinValue;
+    }
+
+    public void setShortMinValue(Short shortMinValue) {
+        this.shortMinValue = shortMinValue;
+    }
+
+    public Short getShortMaxValue() {
+        return shortMaxValue;
+    }
+
+    public void setShortMaxValue(Short shortMaxValue) {
+        this.shortMaxValue = shortMaxValue;
+    }
+
+    public Long getLongRange() {
+        return longRange;
+    }
+
+    public void setLongRange(Long longRange) {
+        this.longRange = longRange;
+    }
+
+    public Long getLongMinValue() {
+        return longMinValue;
+    }
+
+    public void setLongMinValue(Long longMinValue) {
+        this.longMinValue = longMinValue;
+    }
+
+    public Long getLongMaxValue() {
+        return longMaxValue;
+    }
+
+    public void setLongMaxValue(Long longMaxValue) {
+        this.longMaxValue = longMaxValue;
+    }
+
+    public Date getDateRange() {
+        return dateRange;
+    }
+
+    public void setDateRange(Date dateRange) {
+        this.dateRange = dateRange;
+    }
+
+    public Date getDateMinValue() {
+        return dateMinValue;
+    }
+
+    public void setDateMinValue(Date dateMinValue) {
+        this.dateMinValue = dateMinValue;
+    }
+
+    public Date getDateMaxValue() {
+        return dateMaxValue;
+    }
+
+    public void setDateMaxValue(Date dateMaxValue) {
+        this.dateMaxValue = dateMaxValue;
+    }
+
+    public String getDateFormat() {
+        return dateFormat;
+    }
+
+    public void setDateFormat(String dateFormat) {
+        this.dateFormat = dateFormat;
+    }
+
+    public void setStringValue(String stringValue) {
+        this.stringValue = stringValue;
+    }
+
+    public String getStringValue() {
+        return stringValue;
+    }
+}

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/java/com/opensymphony/xwork2/validator/validators/ValidatorSupportTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/com/opensymphony/xwork2/validator/validators/ValidatorSupportTest.java b/core/src/test/java/com/opensymphony/xwork2/validator/validators/ValidatorSupportTest.java
new file mode 100644
index 0000000..b2448bc
--- /dev/null
+++ b/core/src/test/java/com/opensymphony/xwork2/validator/validators/ValidatorSupportTest.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2002-2006,2009 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.opensymphony.xwork2.validator.validators;
+
+import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.XWorkTestCase;
+import com.opensymphony.xwork2.ognl.OgnlValueStack;
+import com.opensymphony.xwork2.util.ValueStack;
+import com.opensymphony.xwork2.util.ValueStackFactory;
+import com.opensymphony.xwork2.validator.ValidationException;
+
+/**
+ * @author tmjee
+ * @version $Date$ $Id$
+ */
+public class ValidatorSupportTest extends XWorkTestCase {
+
+	public void testConditionalParseExpression()  throws Exception {
+		ValueStack oldStack = ActionContext.getContext().getValueStack();
+		try {
+			OgnlValueStack stack = (OgnlValueStack) container.getInstance(ValueStackFactory.class).createValueStack();
+			stack.getContext().put(ActionContext.CONTAINER, container);
+			stack.getContext().put("something", "somevalue");
+			ActionContext.getContext().setValueStack(stack);
+			ValidatorSupport validator = new ValidatorSupport() {
+				public void validate(Object object) throws ValidationException {
+				}
+			};
+            validator.setValueStack(ActionContext.getContext().getValueStack());
+
+			String result1 = validator.parse("${#something}", String.class).toString();
+
+			assertEquals(result1, "somevalue");
+		}
+		finally {
+			ActionContext.getContext().setValueStack(oldStack);
+		}
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/ActionSupportTest$MyActionSupport_da.properties
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/ActionSupportTest$MyActionSupport_da.properties b/core/src/test/resources/com/opensymphony/xwork2/ActionSupportTest$MyActionSupport_da.properties
new file mode 100644
index 0000000..1a4a51b
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/ActionSupportTest$MyActionSupport_da.properties
@@ -0,0 +1,10 @@
+#
+# Copyright (c) 2002-2006 by OpenSymphony
+# All rights reserved.
+#
+
+hello=Hello World
+hello.0=Hello World {0}
+hello.1=Hello World. This is {0} speaking {1}
+
+format.number = {0,number,#0.0##}

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/AnnotatedTestBean.properties
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/AnnotatedTestBean.properties b/core/src/test/resources/com/opensymphony/xwork2/AnnotatedTestBean.properties
new file mode 100644
index 0000000..577c8e1
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/AnnotatedTestBean.properties
@@ -0,0 +1 @@
+invalid.count=Count must be between ${min} and ${max}, current value is ${count}.

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/DefaultTextProviderTest_en_CA.properties
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/DefaultTextProviderTest_en_CA.properties b/core/src/test/resources/com/opensymphony/xwork2/DefaultTextProviderTest_en_CA.properties
new file mode 100644
index 0000000..b01a30f
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/DefaultTextProviderTest_en_CA.properties
@@ -0,0 +1,8 @@
+#
+# Copyright (c) 2002-2006 by OpenSymphony
+# All rights reserved.
+#
+
+hello=Hello World
+hello.0=Hello World {0}
+hello.1=Hello World. This is {0} speaking {1}

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/ModelDrivenAction-validation.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/ModelDrivenAction-validation.xml b/core/src/test/resources/com/opensymphony/xwork2/ModelDrivenAction-validation.xml
new file mode 100644
index 0000000..ee6bdc0
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/ModelDrivenAction-validation.xml
@@ -0,0 +1,13 @@
+<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.dtd">
+<validators>
+    <field name="count">
+        <field-validator type="required">
+            <message>You must enter a value for count.</message>
+        </field-validator>
+        <field-validator type="int">
+            <param name="min">1</param>
+            <param name="max">10</param>
+            <message>count must be between ${min} and ${max}, current value is ${count}.</message>
+        </field-validator>
+    </field>
+</validators>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/ModelDrivenAction.properties
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/ModelDrivenAction.properties b/core/src/test/resources/com/opensymphony/xwork2/ModelDrivenAction.properties
new file mode 100644
index 0000000..cb15554
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/ModelDrivenAction.properties
@@ -0,0 +1 @@
+invalid.fieldvalue.birth=Invalid date for birth.

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/ModelDrivenAnnotationAction.properties
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/ModelDrivenAnnotationAction.properties b/core/src/test/resources/com/opensymphony/xwork2/ModelDrivenAnnotationAction.properties
new file mode 100644
index 0000000..d92a833
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/ModelDrivenAnnotationAction.properties
@@ -0,0 +1,6 @@
+#
+# Copyright (c) 2002-2006 by OpenSymphony
+# All rights reserved.
+#
+
+invalid.fieldvalue.birth=Invalid date for birth.

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/SimpleAction-some-alias-validation.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/SimpleAction-some-alias-validation.xml b/core/src/test/resources/com/opensymphony/xwork2/SimpleAction-some-alias-validation.xml
new file mode 100644
index 0000000..e22d206
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/SimpleAction-some-alias-validation.xml
@@ -0,0 +1,13 @@
+<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.dtd">
+<validators>
+    <field name="baz">
+        <field-validator type="required">
+            <message>You must enter a value for baz.</message>
+        </field-validator>
+        <field-validator type="int">
+            <param name="min">2</param>
+            <param name="max">4</param>
+            <message>baz out of range.</message>
+        </field-validator>
+    </field>
+</validators>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/SimpleAction-subproperty-validation.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/SimpleAction-subproperty-validation.xml b/core/src/test/resources/com/opensymphony/xwork2/SimpleAction-subproperty-validation.xml
new file mode 100644
index 0000000..849b5ac
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/SimpleAction-subproperty-validation.xml
@@ -0,0 +1,18 @@
+<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.dtd">
+<validators>
+    <field name="bean.name">
+        <field-validator type="required">
+            <message>You must enter a name for the bean.</message>
+        </field-validator>
+    </field>
+    <field name="bean.count">
+        <field-validator type="required">
+            <message>You must have a count for the bean.</message>
+        </field-validator>
+        <field-validator type="int">
+            <param name="min">0</param>
+            <param name="max">10</param>
+            <message>bean.count out of range.</message>
+        </field-validator>
+    </field>
+</validators>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/SimpleAction-validation.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/SimpleAction-validation.xml b/core/src/test/resources/com/opensymphony/xwork2/SimpleAction-validation.xml
new file mode 100644
index 0000000..e1e9e45
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/SimpleAction-validation.xml
@@ -0,0 +1,58 @@
+<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.dtd">
+<validators>
+    <field name="bar">
+        <field-validator type="required">
+            <message>You must enter a value for bar.</message>
+        </field-validator>
+        <field-validator type="int">
+            <param name="min">6</param>
+            <param name="max">10</param>
+            <message>bar must be between ${min} and ${max}, current value is ${bar}.</message>
+        </field-validator>
+    </field>
+    <field name="percentage">
+        <field-validator type="double">
+            <param name="minExclusive">0.1</param>
+            <param name="maxExclusive">10.1</param>
+            <message>percentage must be between ${minExclusive} and ${maxExclusive}, current value is ${percentage}.</message>
+        </field-validator>
+    </field>
+    <field name="date">
+        <field-validator type="date">
+            <param name="min">12/22/2002</param>
+            <param name="max">12/25/2002</param>
+            <message>The date must be between 12-22-2002 and 12-25-2002.</message>
+        </field-validator>
+    </field>
+    <field name="foo">
+        <field-validator type="int">
+            <param name="min">0</param>
+            <param name="max">100</param>
+            <message key="foo.range">Could not find foo.range!</message>
+        </field-validator>
+    </field>
+    <field name="baz">
+        <field-validator type="int">
+            <param name="min">0</param>
+            <message key="baz.range">Could not find baz.range!</message>
+        </field-validator>
+    </field>
+    <field name="longFoo">
+        <field-validator type="long">
+            <param name="min">0</param>
+            <param name="max">100</param>
+            <message key="foo.range">Could not find foo.range!</message>
+        </field-validator>
+    </field>
+    <field name="shortFoo">
+        <field-validator type="short">
+            <param name="min">0</param>
+            <param name="max">100</param>
+            <message key="foo.range">Could not find foo.range!</message>
+        </field-validator>
+    </field>
+    <validator type="expression">
+        <param name="expression">foo > bar</param>
+        <message>Foo must be greater than Bar. Foo = ${foo}, Bar = ${bar}.</message>
+    </validator>
+</validators>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/SimpleAction-validationAlias-validation.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/SimpleAction-validationAlias-validation.xml b/core/src/test/resources/com/opensymphony/xwork2/SimpleAction-validationAlias-validation.xml
new file mode 100644
index 0000000..e22d206
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/SimpleAction-validationAlias-validation.xml
@@ -0,0 +1,13 @@
+<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.dtd">
+<validators>
+    <field name="baz">
+        <field-validator type="required">
+            <message>You must enter a value for baz.</message>
+        </field-validator>
+        <field-validator type="int">
+            <param name="min">2</param>
+            <param name="max">4</param>
+            <message>baz out of range.</message>
+        </field-validator>
+    </field>
+</validators>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/SimpleAction.properties
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/SimpleAction.properties b/core/src/test/resources/com/opensymphony/xwork2/SimpleAction.properties
new file mode 100644
index 0000000..f99b6e7
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/SimpleAction.properties
@@ -0,0 +1,3 @@
+foo.range=Foo Range Message
+baz.range=${getText(fieldName)} must be greater than ${min}
+baz=Baz Field

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/SimpleAction_de.properties
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/SimpleAction_de.properties b/core/src/test/resources/com/opensymphony/xwork2/SimpleAction_de.properties
new file mode 100644
index 0000000..62f0bfc
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/SimpleAction_de.properties
@@ -0,0 +1 @@
+foo.range=I don''t know German

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/SimpleAction_en.properties
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/SimpleAction_en.properties b/core/src/test/resources/com/opensymphony/xwork2/SimpleAction_en.properties
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/SimpleAnnotationAction.properties
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/SimpleAnnotationAction.properties b/core/src/test/resources/com/opensymphony/xwork2/SimpleAnnotationAction.properties
new file mode 100644
index 0000000..16819aa
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/SimpleAnnotationAction.properties
@@ -0,0 +1,8 @@
+#
+# Copyright (c) 2002-2006 by OpenSymphony
+# All rights reserved.
+#
+
+foo.range=Foo Range Message
+baz.range=${getText(fieldName)} must be greater than ${min}
+baz=Baz Field

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/SimpleAnnotationAction_de.properties
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/SimpleAnnotationAction_de.properties b/core/src/test/resources/com/opensymphony/xwork2/SimpleAnnotationAction_de.properties
new file mode 100644
index 0000000..773a7fc
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/SimpleAnnotationAction_de.properties
@@ -0,0 +1,6 @@
+#
+# Copyright (c) 2002-2006 by OpenSymphony
+# All rights reserved.
+#
+
+foo.range=I don''t know German

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/SimpleAnnotationAction_en.properties
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/SimpleAnnotationAction_en.properties b/core/src/test/resources/com/opensymphony/xwork2/SimpleAnnotationAction_en.properties
new file mode 100644
index 0000000..7d0bcf9
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/SimpleAnnotationAction_en.properties
@@ -0,0 +1,5 @@
+#
+# Copyright (c) 2002-2006 by OpenSymphony
+# All rights reserved.
+#
+

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/TestBean-anotherContext-validation.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/TestBean-anotherContext-validation.xml b/core/src/test/resources/com/opensymphony/xwork2/TestBean-anotherContext-validation.xml
new file mode 100644
index 0000000..b1eee9e
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/TestBean-anotherContext-validation.xml
@@ -0,0 +1,10 @@
+<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.dtd">
+<validators>
+    <field name="count">
+        <field-validator type="int">
+            <param name="min">1</param>
+            <param name="max">100</param>
+            <message>Count must be between ${min} and ${max}, current value is ${count}.</message>
+        </field-validator>
+    </field>
+</validators>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/TestBean-badtest-validation.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/TestBean-badtest-validation.xml b/core/src/test/resources/com/opensymphony/xwork2/TestBean-badtest-validation.xml
new file mode 100644
index 0000000..2d2aa4e
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/TestBean-badtest-validation.xml
@@ -0,0 +1,8 @@
+<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.dtd">
+<validators>
+    <field name="name">
+        <field-validator type="requiredstring" foo="bar">
+            <message>You must enter a name.</message>
+        </field-validator>
+    </field>
+</validators>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/TestBean-beanMessageBundle-validation.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/TestBean-beanMessageBundle-validation.xml b/core/src/test/resources/com/opensymphony/xwork2/TestBean-beanMessageBundle-validation.xml
new file mode 100644
index 0000000..4e0a3df
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/TestBean-beanMessageBundle-validation.xml
@@ -0,0 +1,15 @@
+<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0.2//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
+<validators>
+    <field name="count">
+        <field-validator type="int" short-circuit="true">
+            <param name="min">1</param>
+            <param name="max">100</param>
+            <message key="invalid.count">Invalid count value, must be between ${min} and ${max}, current value ${count}!</message>
+        </field-validator>
+        <field-validator type="int">
+            <param name="min">20</param>
+            <param name="max">80</param>
+            <message key="invalid.count.bad">Smaller Invalid Count: ${count}</message>
+        </field-validator>
+    </field>
+</validators>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/TestBean-expressionValidation-validation.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/TestBean-expressionValidation-validation.xml b/core/src/test/resources/com/opensymphony/xwork2/TestBean-expressionValidation-validation.xml
new file mode 100644
index 0000000..5537544
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/TestBean-expressionValidation-validation.xml
@@ -0,0 +1,9 @@
+<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.dtd">
+<validators>
+    <field name="name">
+        <field-validator type="fieldexpression">
+            <param name="expression">name.length() > 5</param>
+            <message>Name must be greater than 5 characters, it is currently '${name}'</message>
+        </field-validator>
+    </field>
+</validators>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/TestBean-validation.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/TestBean-validation.xml b/core/src/test/resources/com/opensymphony/xwork2/TestBean-validation.xml
new file mode 100644
index 0000000..7a3efc5
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/TestBean-validation.xml
@@ -0,0 +1,8 @@
+<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.dtd">
+<validators>
+    <field name="name">
+        <field-validator type="requiredstring">
+            <message>You must enter a name.</message>
+        </field-validator>
+    </field>
+</validators>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/TestBean-visitorChildValidation-validation.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/TestBean-visitorChildValidation-validation.xml b/core/src/test/resources/com/opensymphony/xwork2/TestBean-visitorChildValidation-validation.xml
new file mode 100644
index 0000000..cdae277
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/TestBean-visitorChildValidation-validation.xml
@@ -0,0 +1,14 @@
+<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.dtd">
+<validators>
+    <field name="birth">
+        <field-validator type="date">
+            <param name="min">01/01/1970</param>
+            <message>You must have been born after 1970.</message>
+        </field-validator>
+    </field>
+    <field name="child">
+        <field-validator type="visitor">
+            <message>child bean: </message>
+        </field-validator>
+    </field>
+</validators>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/TestBean-visitorValidation-validation.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/TestBean-visitorValidation-validation.xml b/core/src/test/resources/com/opensymphony/xwork2/TestBean-visitorValidation-validation.xml
new file mode 100644
index 0000000..fabf794
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/TestBean-visitorValidation-validation.xml
@@ -0,0 +1,9 @@
+<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.dtd">
+<validators>
+    <field name="birth">
+        <field-validator type="date">
+            <param name="min">01/01/1970</param>
+            <message>You must have been born after 1970.</message>
+        </field-validator>
+    </field>
+</validators>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/TestBean.properties
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/TestBean.properties b/core/src/test/resources/com/opensymphony/xwork2/TestBean.properties
new file mode 100644
index 0000000..577c8e1
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/TestBean.properties
@@ -0,0 +1 @@
+invalid.count=Count must be between ${min} and ${max}, current value is ${count}.

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/TestChildBean-validation.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/TestChildBean-validation.xml b/core/src/test/resources/com/opensymphony/xwork2/TestChildBean-validation.xml
new file mode 100644
index 0000000..9329801
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/TestChildBean-validation.xml
@@ -0,0 +1,23 @@
+<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0.2//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
+<validators>
+    <field name="name">
+        <field-validator type="requiredstring" short-circuit="true">
+            <message>You must enter a name.</message>
+        </field-validator>
+    <field-validator type="fieldexpression">
+        <param name="expression">name == 'test'</param>
+        <message>Name is invalid</message>
+    </field-validator> 
+    </field>
+    <field name="birth">
+        <field-validator type="date">
+            <param name="min">01/01/1970</param>
+            <message>You must have been born after 1970.</message>
+        </field-validator>
+    </field>
+    <field name="count">
+        <field-validator type="conversion">
+            <message>Count must be an integer.</message>
+        </field-validator>
+    </field>
+</validators>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/TextProviderSupportTest_en.properties
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/TextProviderSupportTest_en.properties b/core/src/test/resources/com/opensymphony/xwork2/TextProviderSupportTest_en.properties
new file mode 100644
index 0000000..a44802b
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/TextProviderSupportTest_en.properties
@@ -0,0 +1,12 @@
+#
+# Copyright (c) 2002-2006 by OpenSymphony
+# All rights reserved.
+#
+
+hello=Hello World
+hello.0=Hello World {0}
+hello.1=Hello World. This is {0} speaking {1}
+#wrong (unescaped ', {, \): symbols1="=!@#$%^&*(){qwe}<>?:|}{[]\';/.,<>`~'
+symbols1="=!@#$%^&*()'{'qwe}<>?:|}'{'[]\\'';/.,<>`~''
+#wrong: symbols1="=!@#$%^&*()<>?:|[]\';/.,<>`~'
+symbols2="=!@#$%^&*()<>?:|[]\\'';/.,<>`~''

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/ValidationOrderAction-validation.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/ValidationOrderAction-validation.xml b/core/src/test/resources/com/opensymphony/xwork2/ValidationOrderAction-validation.xml
new file mode 100644
index 0000000..481aa34
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/ValidationOrderAction-validation.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE validators PUBLIC 
+  		"-//Apache Struts//XWork Validator 1.0.2//EN"
+  		"http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
+
+<validators>
+	<field name="username">
+		<field-validator type="requiredstring">
+			<message>username required</message>
+		</field-validator>
+	</field>
+
+	<field name="password">
+		<field-validator type="requiredstring">
+			<message>password required</message>
+		</field-validator>
+	</field>
+
+	<field name="confirmPassword">
+		<field-validator type="requiredstring">
+			<message>confirm password required</message>
+		</field-validator>
+		<field-validator type="fieldexpression">
+			<param name="expression">
+                (confirmPassword.equals(password))
+			</param>
+			<message>confirmed password must match password</message>
+		</field-validator>
+	</field>
+	
+	<field name="firstName">
+		<field-validator type="requiredstring">
+			<message>first name required</message>
+		</field-validator>
+	</field>
+	
+	<field name="lastName">
+		<field-validator type="requiredstring">
+			<message>last name required</message>
+		</field-validator>
+	</field>
+
+	<field name="city">
+		<field-validator type="requiredstring">
+			<message>city is required</message>
+		</field-validator>
+	</field>
+	
+	<field name="province">
+		<field-validator type="requiredstring">
+			<message>province is required</message>
+		</field-validator>
+	</field>
+	
+	<field name="country">
+		<field-validator type="requiredstring">
+			<message>country is required</message>
+		</field-validator>
+	</field>
+	
+	<field name="postalCode">
+		<field-validator type="requiredstring">
+			<message>postal code is required</message>
+		</field-validator>
+	</field>
+	
+	<field name="email">
+		<field-validator type="requiredstring">
+			<message>email is required</message>
+		</field-validator>
+		<field-validator type="email">
+			<message>email is invalid</message>
+		</field-validator>
+	</field>
+
+	<field name="website">
+		<field-validator type="requiredstring">
+			<message>website is required</message>
+		</field-validator>
+	</field>
+	
+	<field name="passwordHint">
+		<field-validator type="requiredstring">
+			<message>password hint is required</message>
+		</field-validator>
+	</field>
+</validators>
+

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/loadorder1/xwork-test-load-order.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/loadorder1/xwork-test-load-order.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/loadorder1/xwork-test-load-order.xml
new file mode 100644
index 0000000..c62a21c
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/loadorder1/xwork-test-load-order.xml
@@ -0,0 +1,7 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 2.1.3//EN"
+    "http://struts.apache.org/dtds/xwork-2.1.3.dtd"
+ >
+
+<xwork order="2">
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/loadorder2/xwork-test-load-order.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/loadorder2/xwork-test-load-order.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/loadorder2/xwork-test-load-order.xml
new file mode 100644
index 0000000..4e59b8f
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/loadorder2/xwork-test-load-order.xml
@@ -0,0 +1,7 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 2.1.3//EN"
+    "http://struts.apache.org/dtds/xwork-2.1.3.dtd"
+ >
+
+<xwork order="3">
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/loadorder3/xwork-test-load-order.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/loadorder3/xwork-test-load-order.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/loadorder3/xwork-test-load-order.xml
new file mode 100644
index 0000000..c657218
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/loadorder3/xwork-test-load-order.xml
@@ -0,0 +1,7 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 2.1.3//EN"
+    "http://struts.apache.org/dtds/xwork-2.1.3.dtd"
+ >
+
+<xwork order="1">
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork- test.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork- test.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork- test.xml
new file mode 100644
index 0000000..a8f635e
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork- test.xml	
@@ -0,0 +1,81 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 1.1.1//EN"
+    "http://struts.apache.org/dtds/xwork-1.1.1.dtd"
+ >
+
+<xwork>
+	<include file="xwork-test-beans.xml" />
+    <package name="default">
+        <result-types>
+            <result-type name="chain" class="com.opensymphony.xwork2.ActionChainResult" default="true"/>
+            <result-type name="mock" class="com.opensymphony.xwork2.mock.MockResult"/>
+        </result-types>
+
+        <interceptors>
+            <interceptor name="timer" class="com.opensymphony.xwork2.interceptor.TimerInterceptor"/>
+            <interceptor name="logging" class="com.opensymphony.xwork2.interceptor.LoggingInterceptor"/>
+            <interceptor name="test" class="com.opensymphony.xwork2.mock.MockInterceptor">
+                <param name="foo">fooDefault</param>
+            </interceptor>
+
+            <interceptor-stack name="defaultStack">
+                <interceptor-ref name="timer"/>
+            </interceptor-stack>
+        </interceptors>
+
+        <global-results>
+            <result name="login"> <!-- should be chain type since it is the default -->
+                <param name="actionName">login</param>
+            </result>
+        </global-results>
+
+        <action name="Bar" class="com.opensymphony.xwork2.SimpleAction">
+            <param name="foo">17</param>
+            <param name="bar">23</param>
+            <param name="testXW412">foo.jspa?fooID=${fooID}&amp;something=bar</param>
+            <param name="testXW412Again">
+            		something
+            </param>
+            <param name="testForXW171"></param>
+        </action>
+
+        <action name="Foo" class="com.opensymphony.xwork2.SimpleAction">
+            <param name="foo">18</param>
+            <param name="bar">24</param>
+            <result name="success" type="mock" />
+            <interceptor-ref name="defaultStack"/>
+        </action>
+
+        <action name="WildCard" class="com.opensymphony.xwork2.SimpleAction">
+            <result name="*" type="mock" />
+            <interceptor-ref name="defaultStack"/>
+        </action>
+
+        <action name="FooBar" class="com.opensymphony.xwork2.SimpleAction">
+            <param name="foo">18</param>
+            <param name="bar">24</param>
+            <result name="success" type="mock" />
+            <interceptor-ref name="defaultStack"/>
+            <exception-mapping name="runtime" exception="java.lang.RuntimeException" result="exception"/>
+        </action>
+
+        <action name="TestInterceptorParam" class="com.opensymphony.xwork2.SimpleAction">
+            <interceptor-ref name="test">
+                <param name="expectedFoo">expectedFooValue</param>
+            </interceptor-ref>
+        </action>
+
+        <action name="TestInterceptorParamOverride" class="com.opensymphony.xwork2.SimpleAction">
+            <interceptor-ref name="test">
+                <param name="foo">foo123</param>
+                <param name="expectedFoo">expectedFooValue</param>
+            </interceptor-ref>
+        </action>
+
+        <action name="BarWithoutClassName">
+            <param name="foo">17</param>
+            <param name="bar">23</param>
+        </action>
+
+    </package>
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-include-after-package-2.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-include-after-package-2.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-include-after-package-2.xml
new file mode 100644
index 0000000..39461ec
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-include-after-package-2.xml
@@ -0,0 +1,14 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 2.0//EN"
+    "http://struts.apache.org/dtds/xwork-2.0.dtd"
+ >
+
+<xwork>
+    <package name="namespace5" extends="namespace4" namespace="/namespace5">
+        <action name="action5" class="com.opensymphony.xwork2.SimpleAction">
+            <result name="success" type="chain"/>
+            <interceptor-ref name="params"/>
+        </action>
+    </package>
+
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-include-after-package.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-include-after-package.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-include-after-package.xml
new file mode 100644
index 0000000..8e55e8e
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-include-after-package.xml
@@ -0,0 +1,20 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 2.0//EN"
+    "http://struts.apache.org/dtds/xwork-2.0.dtd"
+ >
+
+<xwork>
+    <package name="namespace4" extends="namespace1" namespace="/namespace4">
+        <interceptors>
+            <interceptor name="staticParams" class="com.opensymphony.xwork2.interceptor.StaticParametersInterceptor"/>
+        </interceptors>
+
+        <action name="action4" class="com.opensymphony.xwork2.SimpleAction">
+            <result name="success" type="chain"/>
+            <interceptor-ref name="params"/>
+        </action>
+    </package>
+
+
+    <include file="com/opensymphony/xwork2/config/providers/xwork-include-after-package-2.xml" />
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-include-before-package-2.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-include-before-package-2.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-include-before-package-2.xml
new file mode 100644
index 0000000..ac30cc2
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-include-before-package-2.xml
@@ -0,0 +1,14 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 2.0//EN"
+    "http://struts.apache.org/dtds/xwork-2.0.dtd"
+ >
+
+<xwork>
+    <package name="namespace2" extends="namespace1" namespace="/namespace2">
+        <action name="action2" class="com.opensymphony.xwork2.SimpleAction">
+            <result name="success" type="chain"/>
+            <interceptor-ref name="params"/>
+        </action>
+    </package>
+
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-include-before-package.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-include-before-package.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-include-before-package.xml
new file mode 100644
index 0000000..99bb3b4
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-include-before-package.xml
@@ -0,0 +1,22 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 2.0//EN"
+    "http://struts.apache.org/dtds/xwork-2.0.dtd"
+ >
+
+<xwork>
+	<include file="xwork-test-beans.xml" />
+
+    <package name="namespace1" extends="default" namespace="/namespace1">
+        <interceptors>
+            <interceptor name="staticParams" class="com.opensymphony.xwork2.interceptor.StaticParametersInterceptor"/>
+        </interceptors>
+
+        <action name="action1" class="com.opensymphony.xwork2.SimpleAction">
+            <result name="success" type="chain"/>
+            <interceptor-ref name="params"/>
+        </action>
+    </package>
+
+    <include file="com/opensymphony/xwork2/config/providers/xwork-include-before-package-2.xml" />
+
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-include-parent.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-include-parent.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-include-parent.xml
new file mode 100644
index 0000000..e7f9162
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-include-parent.xml
@@ -0,0 +1,22 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 2.0//EN"
+    "http://struts.apache.org/dtds/xwork-2.0.dtd"
+ >
+
+<xwork>
+	<include file="xwork-test-default.xml" />
+
+    <package name="default">
+        <result-types>
+            <result-type name="chain" class="com.opensymphony.xwork2.ActionChainResult" default="true"/>
+        </result-types>
+        <interceptors>
+            <interceptor name="params" class="com.opensymphony.xwork2.interceptor.ParametersInterceptor"/>
+        </interceptors>
+    </package>
+
+    <include file="com/opensymphony/xwork2/config/providers/xwork-include-before-package.xml" />
+
+
+    <include file="com/opensymphony/xwork2/config/providers/xwork-include-after-package.xml" />
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-action-invalid.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-action-invalid.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-action-invalid.xml
new file mode 100644
index 0000000..dca52f8
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-action-invalid.xml
@@ -0,0 +1,23 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 1.1.1//EN"
+    "http://struts.apache.org/dtds/xwork-1.1.1.dtd"
+ >
+
+<xwork>
+	<include file="xwork-test-beans.xml" />
+    <package name="default">
+
+        <action name="Foo" class="com.opensymphony.xwork2.config.providers.PrivateConstructorAction">
+            <param name="foo">13</param>
+        </action>
+
+        <action name="Bar" class="com.opensymphony.xwork2.config.providers.NoNoArgsConstructorAction">
+            <param name="bar">17</param>
+        </action>
+
+        <action name="FooBar" class="com.opensymphony.xwork2.config.providers.IDoNotExistAction">
+            <param name="foobar">17</param>
+        </action>
+
+    </package>
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-actions-packagedefaultclassref.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-actions-packagedefaultclassref.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-actions-packagedefaultclassref.xml
new file mode 100644
index 0000000..f0cc446
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-actions-packagedefaultclassref.xml
@@ -0,0 +1,41 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 2.0//EN"
+    "http://struts.apache.org/dtds/xwork-2.0.dtd"
+ >
+
+<xwork>
+    <package name="default">
+
+        <result-types>
+            <result-type name="chain" class="com.opensymphony.xwork2.ActionChainResult" default="true"/>
+            <result-type name="mock" class="com.opensymphony.xwork2.mock.MockResult"/>
+        </result-types>
+
+        <interceptors>
+            <interceptor name="timer" class="com.opensymphony.xwork2.interceptor.TimerInterceptor"/>
+            <interceptor name="logging" class="com.opensymphony.xwork2.interceptor.LoggingInterceptor"/>
+            <interceptor name="test" class="com.opensymphony.xwork2.mock.MockInterceptor">
+                <param name="foo">fooDefault</param>
+            </interceptor>
+
+            <interceptor-stack name="defaultStack">
+                <interceptor-ref name="timer"/>
+            </interceptor-stack>
+        </interceptors>
+
+		<default-class-ref class="com.opensymphony.xwork2.UserSpecifiedDefaultAction" />
+
+        <global-results>
+            <result name="login"> <!-- should be chain type since it is the default -->
+                <param name="actionName">login</param>
+            </result>
+        </global-results>
+
+		<!--  No class spcified for action. This should use the default-class-ref -->
+        <action name="Bar">
+            <param name="foo">17</param>
+            <param name="bar">23</param>
+            <param name="testForXW171"></param>
+        </action>
+    </package>
+</xwork>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-actions.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-actions.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-actions.xml
new file mode 100644
index 0000000..a8f635e
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-actions.xml
@@ -0,0 +1,81 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 1.1.1//EN"
+    "http://struts.apache.org/dtds/xwork-1.1.1.dtd"
+ >
+
+<xwork>
+	<include file="xwork-test-beans.xml" />
+    <package name="default">
+        <result-types>
+            <result-type name="chain" class="com.opensymphony.xwork2.ActionChainResult" default="true"/>
+            <result-type name="mock" class="com.opensymphony.xwork2.mock.MockResult"/>
+        </result-types>
+
+        <interceptors>
+            <interceptor name="timer" class="com.opensymphony.xwork2.interceptor.TimerInterceptor"/>
+            <interceptor name="logging" class="com.opensymphony.xwork2.interceptor.LoggingInterceptor"/>
+            <interceptor name="test" class="com.opensymphony.xwork2.mock.MockInterceptor">
+                <param name="foo">fooDefault</param>
+            </interceptor>
+
+            <interceptor-stack name="defaultStack">
+                <interceptor-ref name="timer"/>
+            </interceptor-stack>
+        </interceptors>
+
+        <global-results>
+            <result name="login"> <!-- should be chain type since it is the default -->
+                <param name="actionName">login</param>
+            </result>
+        </global-results>
+
+        <action name="Bar" class="com.opensymphony.xwork2.SimpleAction">
+            <param name="foo">17</param>
+            <param name="bar">23</param>
+            <param name="testXW412">foo.jspa?fooID=${fooID}&amp;something=bar</param>
+            <param name="testXW412Again">
+            		something
+            </param>
+            <param name="testForXW171"></param>
+        </action>
+
+        <action name="Foo" class="com.opensymphony.xwork2.SimpleAction">
+            <param name="foo">18</param>
+            <param name="bar">24</param>
+            <result name="success" type="mock" />
+            <interceptor-ref name="defaultStack"/>
+        </action>
+
+        <action name="WildCard" class="com.opensymphony.xwork2.SimpleAction">
+            <result name="*" type="mock" />
+            <interceptor-ref name="defaultStack"/>
+        </action>
+
+        <action name="FooBar" class="com.opensymphony.xwork2.SimpleAction">
+            <param name="foo">18</param>
+            <param name="bar">24</param>
+            <result name="success" type="mock" />
+            <interceptor-ref name="defaultStack"/>
+            <exception-mapping name="runtime" exception="java.lang.RuntimeException" result="exception"/>
+        </action>
+
+        <action name="TestInterceptorParam" class="com.opensymphony.xwork2.SimpleAction">
+            <interceptor-ref name="test">
+                <param name="expectedFoo">expectedFooValue</param>
+            </interceptor-ref>
+        </action>
+
+        <action name="TestInterceptorParamOverride" class="com.opensymphony.xwork2.SimpleAction">
+            <interceptor-ref name="test">
+                <param name="foo">foo123</param>
+                <param name="expectedFoo">expectedFooValue</param>
+            </interceptor-ref>
+        </action>
+
+        <action name="BarWithoutClassName">
+            <param name="foo">17</param>
+            <param name="bar">23</param>
+        </action>
+
+    </package>
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-allowed-methods.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-allowed-methods.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-allowed-methods.xml
new file mode 100644
index 0000000..7851408
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-allowed-methods.xml
@@ -0,0 +1,48 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 2.3//EN"
+    "http://struts.apache.org/dtds/xwork-2.3.dtd"
+ >
+
+<xwork>
+    <package name="default">
+        <action name="Default">
+        </action>
+
+        <action name="Boring">
+            <allowed-methods> </allowed-methods>
+        </action>
+
+        <action name="Foo">
+            <allowed-methods>foo</allowed-methods>
+        </action>
+
+        <action name="Bar">
+            <allowed-methods>foo,bar</allowed-methods>
+        </action>
+
+        <action name="Baz" method="baz">
+            <allowed-methods>foo,bar</allowed-methods>
+        </action>
+    </package>
+
+    <package name="strict" strict-method-invocation="true">
+        <action name="Default">
+        </action>
+
+        <action name="Boring">
+            <allowed-methods></allowed-methods>
+        </action>
+
+        <action name="Foo">
+            <allowed-methods>foo</allowed-methods>
+        </action>
+
+        <action name="Bar">
+            <allowed-methods>foo,bar</allowed-methods>
+        </action>
+
+        <action name="Baz" method="baz">
+            <allowed-methods>foo,bar</allowed-methods>
+        </action>
+    </package>
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-bad-inheritance.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-bad-inheritance.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-bad-inheritance.xml
new file mode 100644
index 0000000..591aa20
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-bad-inheritance.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 1.1.1//EN"
+    "http://struts.apache.org/dtds/xwork-1.1.1.dtd"
+ >
+
+<xwork>
+	<include file="xwork-test-beans.xml" />
+    <package name="default" />
+
+    <package name="badPackage" extends="nonexistentPackage"/>
+
+    <package name="circularPackage" extends="circularPackage"/>
+
+    <package name="anotherCircularPackage" extends="anotherCircularPackage2"/>
+    
+    <package name="anotherCircularPackage2" extends="anotherCircularPackage"/>
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-basic-packages.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-basic-packages.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-basic-packages.xml
new file mode 100644
index 0000000..69b5cca
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-basic-packages.xml
@@ -0,0 +1,13 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 1.1.1//EN"
+    "http://struts.apache.org/dtds/xwork-1.1.1.dtd"
+ >
+
+<xwork>
+	<include file="xwork-test-beans.xml" />
+    <package name="default" />
+
+    <package name="namespacepkg" namespace="/namespace/set" />
+
+    <package name="abstractpkg" abstract="true" />
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-default-package.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-default-package.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-default-package.xml
new file mode 100644
index 0000000..a403f17
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-default-package.xml
@@ -0,0 +1,9 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 1.1.1//EN"
+    "http://struts.apache.org/dtds/xwork-1.1.1.dtd"
+ >
+
+<xwork>
+	<include file="xwork-test-beans.xml" />
+    <package name="default" />
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-defaultclassref-package.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-defaultclassref-package.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-defaultclassref-package.xml
new file mode 100644
index 0000000..650cc2b
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-defaultclassref-package.xml
@@ -0,0 +1,11 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 2.0//EN"
+    "http://struts.apache.org/dtds/xwork-2.0.dtd"
+ >
+
+<xwork>
+    <package name="hasDefaultClassRef">
+    	<default-class-ref class="com.opensymphony.xwork2.ActionSupport" />
+    </package>
+    <package name="noDefaultClassRef"/>
+</xwork>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-exception-mappings.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-exception-mappings.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-exception-mappings.xml
new file mode 100644
index 0000000..f6e2707
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-exception-mappings.xml
@@ -0,0 +1,33 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 1.1.1//EN"
+    "http://struts.apache.org/dtds/xwork-1.1.1.dtd"
+ >
+
+<xwork>
+	<include file="xwork-test-beans.xml" />
+    <package name="default">
+        <result-types>
+            <result-type name="chain" class="com.opensymphony.xwork2.ActionChainResult" default="true"/>
+            <result-type name="mock" class="com.opensymphony.xwork2.mock.MockResult"/>
+        </result-types>
+
+        <global-results>
+            <!-- should be chain type since it is the default -->
+            <result name="login">login</result>
+        </global-results>
+
+        <global-exception-mappings>
+            <exception-mapping exception="java.lang.RuntimeException" result="runForDeeHillz"/>
+            <exception-mapping exception="com.opensymphony.xwork2.XworkException" result="xworkNaughty"/>
+        </global-exception-mappings>
+
+        <action name="Bar" class="com.opensymphony.xwork2.SimpleAction">
+            <exception-mapping exception="com.opensymphony.xwork2.SpookyException" result="spooky-result"/>
+            <result name="spooky-result" type="mock"/>
+            <result name="specificLocationResult">
+                <param name="actionName">bar.vm</param>
+            </result>
+        </action>
+
+    </package>
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-global-result-inheritence.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-global-result-inheritence.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-global-result-inheritence.xml
new file mode 100644
index 0000000..f50d169
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-global-result-inheritence.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 1.1.1//EN"
+    "http://struts.apache.org/dtds/xwork-1.1.1.dtd"
+ >
+
+<xwork>
+	<include file="xwork-test-beans.xml" />
+	<package name="parent" namespace="/base">
+		<result-types>
+			<result-type name="mockResult" class="com.opensymphony.xwork2.mock.MockResult" />
+		</result-types>
+		<global-results>
+			<result name="mockResult1" type="mockResult">
+				<param name="identity">p1</param>
+			</result>
+			<result name="mockResult2" type="mockResult">
+				<param name="identity">p2</param>
+			</result>
+		</global-results>
+		<action name="parentAction" />
+	</package>
+
+
+	<package name="another" namespace="/base">
+		<result-types>
+			<result-type name="anotherMockResult" class="com.opensymphony.xwork2.mock.MockResult" />
+		</result-types>
+		<global-results>
+			<result name="mockResult1" type="anotherMockResult">
+				<param name="identity">a1</param>
+			</result>
+			<result name="mockResult2" type="anotherMockResult">
+				<param name="identity">a2</param>
+			</result>
+		</global-results>
+		<action name="anotherAction" />
+	</package>
+
+	<package name="child" extends="parent" namespace="/base">
+		<global-results>
+			<result name="mockResult1" type="mockResult">
+				<param name="identity">c1</param>
+			</result>
+		</global-results>
+		<action name="childAction" />
+	</package>
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptor-defaultref.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptor-defaultref.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptor-defaultref.xml
new file mode 100644
index 0000000..81481b2
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptor-defaultref.xml
@@ -0,0 +1,30 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 1.1.1//EN"
+    "http://struts.apache.org/dtds/xwork-1.1.1.dtd"
+ >
+
+<xwork>
+    <!-- this package has a default interceptor ref - so actions with no refs should have the default ref -->
+    <package name="default">
+        <interceptors>
+            <interceptor name="timer" class="com.opensymphony.xwork2.interceptor.TimerInterceptor"/>
+            <interceptor name="logging" class="com.opensymphony.xwork2.interceptor.LoggingInterceptor"/>
+        </interceptors>
+
+        <default-interceptor-ref name="timer" />
+        <action name="ActionWithOwnRef" class="com.opensymphony.xwork2.SimpleAction">
+            <interceptor-ref name="logging"/>
+        </action>
+        <action name="ActionWithDefaultRef" class="com.opensymphony.xwork2.SimpleAction" />
+    </package>
+
+    <!-- this package has no default interceptor ref - so actions with no refs should inherit the default interceptor -->
+    <!-- this tests that default interceptor refs are inherited -->
+    <package name="subpackage" extends="default">
+        <action name="ActionWithNoRef" class="com.opensymphony.xwork2.SimpleAction" />
+
+        <action name="AnotherActionWithOwnRef" class="com.opensymphony.xwork2.SimpleAction">
+            <interceptor-ref name="logging"/>
+        </action>
+    </package>
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptor-inheritance.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptor-inheritance.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptor-inheritance.xml
new file mode 100644
index 0000000..13d50a4
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptor-inheritance.xml
@@ -0,0 +1,34 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 1.1.1//EN"
+    "http://struts.apache.org/dtds/xwork-1.1.1.dtd"
+ >
+
+<xwork>
+	<include file="xwork-test-beans.xml" />
+    <package name="default">
+        <interceptors>
+            <interceptor name="timer" class="com.opensymphony.xwork2.interceptor.TimerInterceptor"/>
+
+            <interceptor-stack name="defaultStack">
+                <interceptor-ref name="timer"/>
+            </interceptor-stack>
+        </interceptors>
+    </package>
+
+    <package name="subPackage" extends="default">
+        <interceptors>
+            <interceptor-stack name="subDefaultStack">
+                <interceptor-ref name="defaultStack"/>
+            </interceptor-stack>
+        </interceptors>
+    </package>
+
+    <package name="subSubPackage" extends="subPackage">
+        <interceptors>
+            <interceptor-stack name="subSubDefaultStack">
+                <interceptor-ref name="defaultStack"/>
+                <interceptor-ref name="subDefaultStack"/>
+            </interceptor-stack>
+        </interceptors>
+    </package>
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptor-param-overriding.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptor-param-overriding.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptor-param-overriding.xml
new file mode 100644
index 0000000..e0d920b
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptor-param-overriding.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 1.1.1//EN"
+    "http://struts.apache.org/dtds/xwork-1.1.1.dtd">
+
+<xwork>
+	<include file="xwork-test-beans.xml" />
+	<package name="packageOne">
+		<result-types>
+			<result-type name="mock" class="com.opensymphony.xwork2.mock.MockResult" />
+		</result-types>
+	
+		<interceptors>
+			<interceptor name="interceptorOne" class="com.opensymphony.xwork2.config.providers.InterceptorForTestPurpose" />
+			<interceptor name="interceptorTwo" class="com.opensymphony.xwork2.config.providers.InterceptorForTestPurpose" />
+			<interceptor name="interceptorThree" class="com.opensymphony.xwork2.config.providers.InterceptorForTestPurpose" />
+			
+			<interceptor-stack name="stackOne">
+				<interceptor-ref name="interceptorOne" />
+				<interceptor-ref name="interceptorTwo" />
+				<interceptor-ref name="interceptorThree" />
+			</interceptor-stack>
+		</interceptors>
+		
+		<action name="actionOne">
+			<interceptor-ref name="stackOne">
+				<param name="interceptorOne.paramOne">i1p1</param>
+				<param name="interceptorOne.paramTwo">i1p2</param>
+				<param name="interceptorTwo.paramOne">i2p1</param>
+			</interceptor-ref>
+			<result name="success" type="mock">test1</result>
+		</action>
+		
+		<action name="actionTwo">
+			<interceptor-ref name="stackOne">
+				<param name="interceptorThree.paramOne">i3p1</param>
+				<param name="interceptorThree.paramTwo">i3p2</param>
+				<param name="interceptorTwo.paramTwo">i2p2</param>
+			</interceptor-ref>
+			<result name="success" type="mock">test2</result>
+		</action>
+	</package>
+</xwork>    
+    
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptor-params.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptor-params.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptor-params.xml
new file mode 100644
index 0000000..493320c
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptor-params.xml
@@ -0,0 +1,37 @@
+<!DOCTYPE xwork PUBLIC
+        "-//Apache Struts//XWork 1.1.1//EN"
+        "http://struts.apache.org/dtds/xwork-1.1.1.dtd"
+        >
+
+<xwork>
+	<include file="xwork-test-beans.xml" />
+    <package name="default">
+        <interceptors>
+            <interceptor name="timer" class="com.opensymphony.xwork2.interceptor.TimerInterceptor"/>
+            <interceptor name="test" class="com.opensymphony.xwork2.mock.MockInterceptor">
+                <param name="foo">fooDefault</param>
+            </interceptor>
+
+            <interceptor-stack name="defaultStack">
+                <interceptor-ref name="timer"/>
+                <interceptor-ref name="test"/>
+            </interceptor-stack>
+        </interceptors>
+
+        <default-interceptor-ref name="defaultStack" />
+
+        <action name="TestInterceptorParam" class="com.opensymphony.xwork2.SimpleAction">
+            <interceptor-ref name="defaultStack">
+                <param name="test.expectedFoo">expectedFooValue</param>
+            </interceptor-ref>
+        </action>
+
+        <action name="TestInterceptorParamOverride" class="com.opensymphony.xwork2.SimpleAction">
+            <interceptor-ref name="defaultStack">
+                <param name="test.foo">foo123</param>
+                <param name="test.expectedFoo">expectedFooValue2</param>
+            </interceptor-ref>
+        </action>
+    </package>
+
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptor-stack-param-overriding.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptor-stack-param-overriding.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptor-stack-param-overriding.xml
new file mode 100644
index 0000000..3ab77c1
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptor-stack-param-overriding.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 2.0//EN"
+    "http://struts.apache.org/dtds/xwork-2.0.dtd">
+
+<xwork>
+	<package name="packageOne">
+		<result-types>
+			<result-type name="mock" class="com.opensymphony.xwork2.mock.MockResult" />
+		</result-types>
+
+		<interceptors>
+			<interceptor name="interceptorOne" class="com.opensymphony.xwork2.config.providers.InterceptorForTestPurpose" />
+			<interceptor name="interceptorTwo" class="com.opensymphony.xwork2.config.providers.InterceptorForTestPurpose" />
+			<interceptor name="interceptorThree" class="com.opensymphony.xwork2.config.providers.InterceptorForTestPurpose" />
+
+			<interceptor-stack name="stackOne">
+				<interceptor-ref name="interceptorOne" />
+				<interceptor-ref name="interceptorTwo" />
+				<interceptor-ref name="interceptorThree" />
+			</interceptor-stack>
+
+			<interceptor-stack name="stackTwo">
+				<interceptor-ref name="stackOne" />
+			</interceptor-stack>
+
+			<interceptor-stack name="stackThree">
+				<interceptor-ref name="stackTwo" />
+			</interceptor-stack>
+
+		</interceptors>
+
+		<action name="actionOne">
+			<interceptor-ref name="stackTwo">
+				<param name="stackOne.interceptorOne.paramOne">i1p1</param>
+				<param name="stackOne.interceptorOne.paramTwo">i1p2</param>
+				<param name="stackOne.interceptorTwo.paramOne">i2p1</param>
+			</interceptor-ref>
+			<result name="success" type="mock">test1</result>
+		</action>
+
+		<action name="actionTwo">
+			<interceptor-ref name="stackThree">
+				<param name="stackTwo.stackOne.interceptorThree.paramOne">i3p1</param>
+				<param name="stackTwo.stackOne.interceptorThree.paramTwo">i3p2</param>
+				<param name="stackTwo.stackOne.interceptorTwo.paramTwo">i2p2</param>
+			</interceptor-ref>
+			<result name="success" type="mock">test2</result>
+		</action>
+	</package>
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptors-basic.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptors-basic.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptors-basic.xml
new file mode 100644
index 0000000..41d98c8
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptors-basic.xml
@@ -0,0 +1,27 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 1.1.1//EN"
+    "http://struts.apache.org/dtds/xwork-1.1.1.dtd"
+ >
+
+<xwork>
+	<include file="xwork-test-beans.xml" />
+    <package name="default">
+        <interceptors>
+            <interceptor name="timer" class="com.opensymphony.xwork2.interceptor.TimerInterceptor"/>
+            <interceptor name="logging" class="com.opensymphony.xwork2.interceptor.LoggingInterceptor"/>
+            <interceptor name="test" class="com.opensymphony.xwork2.mock.MockInterceptor">
+                <param name="foo">expectedFoo</param>
+            </interceptor>
+
+            <interceptor-stack name="defaultStack">
+                <interceptor-ref name="timer"/>
+                <interceptor-ref name="test"/>
+            </interceptor-stack>
+
+            <interceptor-stack name="derivativeStack">
+                <interceptor-ref name="defaultStack"/>
+                <interceptor-ref name="logging"/>
+            </interceptor-stack>
+        </interceptors>
+    </package>
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptors-spring.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptors-spring.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptors-spring.xml
new file mode 100644
index 0000000..a44dc41
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-interceptors-spring.xml
@@ -0,0 +1,13 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 1.1.1//EN"
+    "http://struts.apache.org/dtds/xwork-1.1.1.dtd"
+ >
+
+<xwork>
+	<include file="xwork-test-beans.xml" />
+    <package name="default">
+        <interceptors>
+            <interceptor name="timer" class="timer-interceptor"/>
+        </interceptors>
+    </package>
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-invalid-file.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-invalid-file.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-invalid-file.xml
new file mode 100644
index 0000000..8831075
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-invalid-file.xml
@@ -0,0 +1,9 @@
+        <action name="Foo" class="com.opensymphony.xwork2.SimpleAction">
+            <param name="foo">17</param>
+            <param name="bar">23</param>
+            <result name="success" type="chain">
+                <param name="actionName">Bar</param>
+            </result>
+            <interceptor-ref name="debugStack"/>
+            <interceptor-ref name="defaultStack"/>
+        </action>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-multilevel.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-multilevel.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-multilevel.xml
new file mode 100644
index 0000000..0e270db
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-multilevel.xml
@@ -0,0 +1,45 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 1.1.1//EN"
+    "http://struts.apache.org/dtds/xwork-1.1.1.dtd"
+ >
+
+<xwork>
+	<include file="xwork-test-beans.xml" />
+    <package name="default">
+        <result-types>
+            <result-type name="chain" class="com.opensymphony.xwork2.ActionChainResult" default="true"/>
+        </result-types>
+        <interceptors>
+            <interceptor name="params" class="com.opensymphony.xwork2.interceptor.ParametersInterceptor"/>
+        </interceptors>
+    </package>
+
+    <package name="namespace1" extends="default" namespace="/namespace1">
+        <interceptors>
+            <interceptor name="staticParams" class="com.opensymphony.xwork2.interceptor.StaticParametersInterceptor"/>
+        </interceptors>
+
+        <action name="action1" class="com.opensymphony.xwork2.SimpleAction">
+            <result name="success" type="chain"/>
+            <interceptor-ref name="params"/>
+        </action>
+    </package>
+
+
+    <package name="namespace2" extends="namespace1" namespace="/namespace2">
+        <action name="action2" class="com.opensymphony.xwork2.SimpleAction">
+            <result name="success" type="chain"/>
+            <interceptor-ref name="params"/>
+        </action>
+    </package>
+
+    <package name="namespace3" extends="namespace2" namespace="/namespace3">
+        <action name="action3" class="com.opensymphony.xwork2.SimpleAction">
+            <result name="success" type="chain"/>
+            <interceptor-ref name="params"/>
+            <interceptor-ref name="staticParams"/>
+        </action>
+    </package>
+
+</xwork>
+

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-package-inheritance.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-package-inheritance.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-package-inheritance.xml
new file mode 100644
index 0000000..ef4737a
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-package-inheritance.xml
@@ -0,0 +1,27 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 1.1.1//EN"
+    "http://struts.apache.org/dtds/xwork-1.1.1.dtd"
+ >
+
+<xwork>
+	<include file="xwork-test-beans.xml" />
+    <package name="default" namespace="/default">
+        <action name="default" class="com.opensymphony.xwork2.ActionSupport"/>
+    </package>
+
+    <package name="abstractPackage" abstract="true">
+        <action name="abstract" class="com.opensymphony.xwork2.ActionSupport"/>
+    </package>
+
+    <package name="singleInheritance" namespace="/single" extends="default">
+        <action name="single" class="com.opensymphony.xwork2.ActionSupport"/>
+    </package>
+    
+    <package name="testParentBelow" namespace="/parentBelow" extends="multipleInheritance">
+    	<action name="testParentBelowAction" class="com.opensymphony.xwork2.ActionSupport"/>
+    </package>
+
+    <package name="multipleInheritance" namespace="/multiple" extends="default,abstractPackage,singleInheritance">
+        <action name="multiple" class="com.opensymphony.xwork2.ActionSupport"/>
+    </package>
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-result-inheritance.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-result-inheritance.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-result-inheritance.xml
new file mode 100644
index 0000000..25952a4
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-result-inheritance.xml
@@ -0,0 +1,26 @@
+<!DOCTYPE xwork PUBLIC
+    "-//Apache Struts//XWork 1.1.1//EN"
+    "http://struts.apache.org/dtds/xwork-1.1.1.dtd"
+ >
+
+<xwork>
+	<include file="xwork-test-beans.xml" />
+    <package name="default">
+        <result-types>
+            <result-type name="chain" class="com.opensymphony.xwork2.ActionChainResult" default="true" />
+            <result-type name="mock" class="com.opensymphony.xwork2.mock.MockResult"/>
+        </result-types>
+    </package>
+
+    <package name="subPackage" extends="default">
+        <result-types>
+            <result-type name="subMock" class="com.opensymphony.xwork2.mock.MockResult"/>
+        </result-types>
+
+        <action name="Bar" class="com.opensymphony.xwork2.SimpleAction">
+            <result name="chainDefaultTypedResult" />
+            <result name="mockTypedResult" type="mock" />
+            <result name="subMockTypedResult" type="subMock" />
+        </action>
+    </package>
+</xwork>

http://git-wip-us.apache.org/repos/asf/struts/blob/82cb1286/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-result-types.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-result-types.xml b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-result-types.xml
new file mode 100644
index 0000000..ec226eb
--- /dev/null
+++ b/core/src/test/resources/com/opensymphony/xwork2/config/providers/xwork-test-result-types.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE xwork PUBLIC 
+	"-//Apache Struts//XWork 1.1.1//EN"
+	"http://struts.apache.org/dtds/xwork-1.1.1.dtd">
+ 
+<xwork>
+    <include file="xwork-test-beans.xml" />
+	<package name="xworkResultTypesTestPackage1">
+		<result-types>
+			<result-type name="result1" class="com.opensymphony.xwork2.mock.MockResult" >
+				<param name="param1">value1</param>
+				<param name="param2">value2</param>
+				<param name="param3">value3</param>
+			</result-type>
+			<result-type name="result2" class="com.opensymphony.xwork2.mock.MockResult">
+				<param name="paramA">valueA</param>
+				<param name="paramB">valueB</param>
+			</result-type>
+		</result-types>
+	</package>
+	
+	
+	<package name="xworkResultTypesTestPackage2">
+		<result-types>
+			<result-type name="result1" class="com.opensymphony.xwork2.mock.MockResult" >
+				<param name="param1">value1</param>
+				<param name="param2">value2</param>
+				<param name="param3">value3</param>
+			</result-type>
+			<result-type name="result2" class="com.opensymphony.xwork2.mock.MockResult">
+				<param name="paramA">valueA</param>
+				<param name="paramB">valueB</param>
+			</result-type>
+		</result-types>
+		
+		<action name="action1">
+			<result name="success" type="result1">
+				<param name="param1">newValue1</param>
+				<param name="param3">newValue3</param>
+				<param name="param10">value10</param>
+				<param name="param11">value11</param>
+			</result>
+		</action>
+		
+		<action name="action2">
+			<result name="success" type="result2">
+				<param name="paramB">newValueB</param>
+				<param name="paramZ">valueZ</param>
+			</result>
+		</action>
+	</package>
+	
+</xwork>


Mime
View raw message