You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by hu...@apache.org on 2006/02/10 22:05:22 UTC
svn commit: r376846 [1/14] - in
/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib: ./ bean/
bean/resources/ html/ logic/
Author: husted
Date: Fri Feb 10 13:05:03 2006
New Revision: 376846
URL: http://svn.apache.org/viewcvs?rev=376846&view=rev
Log:
Checkstyle Roundup
* Taglib cactus test package reformatted with latest Jalopy settings. Stylistic changes only.
Modified:
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/SimpleBeanForTesting.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/SimpleFormBeanForTesting.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/TaglibTestBase.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestCookieTag.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestDefineTag.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestHeaderTag.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestIncludeTag.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag1.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag1_fr.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag2.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag2_fr.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag3.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag3_fr.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag4.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag4_fr.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag_fr.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestPageTag.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestParameterTag.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestResourceTag.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestSizeTag.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestStrutsTag.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestWriteTag.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/resources/FormTagTestAction.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/resources/IncludeTagTransactionTestAction.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestBaseTag.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestButtonTag1.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestButtonTag2.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestCancelTag1.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestCancelTag2.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestCheckboxTag1.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestCheckboxTag2.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestCheckboxTag3.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestCheckboxTag4.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestErrorsTag1.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestErrorsTag2.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestErrorsTag3.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestErrorsTag4.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestFileTag1.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestFileTag2.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestFormTag1.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestFrameTag1.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestFrameTag2.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestFrameTag3.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestFrameTag4.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestFrameTag5.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestFrameTag6.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestFrameTag7.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestFrameTag8.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestHiddenTag1.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestHiddenTag2.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestHtmlTag.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestImageTag1.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestImageTag2.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestImageTag3.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestImageTag4.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestImageTag5.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestImageTag6.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestImageTag7.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestImageTag8.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestImgTag1.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestImgTag1a.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestImgTag2.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestImgTag3.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestImgTag3a.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestImgTag4.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestImgTag5.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestImgTag5a.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestImgTag6.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestImgTag7.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestImgTag7a.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestImgTag8.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag1.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag2.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag3.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag4.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag5.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag6.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag7.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestLinkTag8.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestMessagesTag1.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestMessagesTag2.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestMessagesTag3.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestMessagesTag4.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestMessagesTag5.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestMessagesTag6.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestMessagesTag7.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestMessagesTag8.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestMultiboxTag1.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestMultiboxTag2.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestMultiboxTag3.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestMultiboxTag4.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestMultiboxTag5.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestOptionTag1.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestOptionsTag1.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestPasswordTag1.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestPasswordTag2.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestRadioTag1.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestRadioTag2.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestResetTag1.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestResetTag2.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestSelectTag1.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestSelectTag2.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestSubmitTag1.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestSubmitTag2.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestTextTag1.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestTextTag2.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestTextareaTag1.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/html/TestTextareaTag2.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/logic/TestEmptyTag.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/logic/TestEqualTag.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/logic/TestGreaterEqualTag.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/logic/TestGreaterThanTag.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/logic/TestIterateTag.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/logic/TestLessEqualTag.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/logic/TestLessThanTag.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/logic/TestNotEqualTag.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/logic/TestNotPresentTag.java
struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/logic/TestPresentTag.java
Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/SimpleBeanForTesting.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/SimpleBeanForTesting.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/SimpleBeanForTesting.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/SimpleBeanForTesting.java Fri Feb 10 13:05:03 2006
@@ -18,310 +18,347 @@
package org.apache.struts.taglib;
+import org.apache.struts.action.ActionForm;
+
import java.util.Collection;
import java.util.Enumeration;
import java.util.List;
import java.util.Map;
-import org.apache.struts.action.ActionForm;
-
/**
- * Simple bean for unit tests.
- *
+ * Simple bean for unit tests.
*/
public class SimpleBeanForTesting extends ActionForm {
- public SimpleBeanForTesting() {
- super();
- }
- public SimpleBeanForTesting(List lst) {
- this.lst = lst;
- }
- public SimpleBeanForTesting(boolean checked) {
- this.checked = checked;
- }
- public SimpleBeanForTesting(Boolean checkedWrapper) {
- this.checkedWrapper = checkedWrapper;
- }
- public SimpleBeanForTesting(Map map) {
- this.map = map;
- }
- public SimpleBeanForTesting(String string) {
- this.string = string;
- }
- public SimpleBeanForTesting(String[] stringArray) {
- this.stringArray = stringArray;
- }
- public SimpleBeanForTesting(Integer integerValue) {
- this.integerValue = integerValue;
- }
-
- private String string;
- private String[] stringArray;
- private Integer integerValue;
- private Double doubleValue;
- private List lst;
- private Map map;
- private String x;
- private String y;
- private Object nestedObject;
- private Object[] array;
- private Enumeration enumeration;
- private Collection collection;
- private boolean checked;
- private Boolean checkedWrapper;
-
- //Copied right from the FAQ
- private String strAry[] =
- { "String 0", "String 1", "String 2", "String 3", "String 4" };
-
- public String getStringIndexed(int index) {
- return (strAry[index]);
- }
- public void setStringIndexed(int index, String value) {
- strAry[index] = value;
- }
-
- /**
- * Returns the lst.
- * @return List
- */
- public List getList() {
- return lst;
- }
-
- /**
- * Returns the map.
- * @return Map
- */
- public Map getMap() {
- return map;
- }
-
- /**
- * Sets the lst.
- * @param lst The lst to set
- */
- public void setList(List lst) {
- this.lst = lst;
- }
-
- /**
- * Sets the map.
- * @param map The map to set
- */
- public void setMap(Map map) {
- this.map = map;
- }
-
- /**
- * Returns the string.
- * @return String
- */
- public String getString() {
- return string;
- }
-
- /**
- * Sets the string.
- * @param string The string to set
- */
- public void setString(String string) {
- this.string = string;
- }
-
- /**
- * Returns an array of type String.
- * @return String[]
- */
- public String[] getStringArray() {
- return stringArray;
- }
-
- /**
- * Sets the string array.
- * @param string The string array to set
- */
- public void setStringArray(String[] stringArray) {
- this.stringArray = stringArray;
- }
-
- /**
- * Returns the lst.
- * @return List
- */
- public List getLst() {
- return lst;
- }
-
- /**
- * Sets the lst.
- * @param lst The lst to set
- */
- public void setLst(List lst) {
- this.lst = lst;
- }
-
- /**
- * Returns the Object Array.
- * @return Object[]
- */
- public Object[] getArray() {
- return array;
- }
-
- /**
- * Sets the Object Array .
- * @param array The Object array to set
- */
- public void setArray(Object[] array) {
- this.array = array;
- }
-
- /**
- * Returns the enumeration.
- * @return Enumeration
- */
- public Enumeration getEnumeration() {
- return enumeration;
- }
-
- /**
- * Sets the enumeration.
- * @param enumeration The enumeration to set
- */
- public void setEnumeration(Enumeration enumeration) {
- this.enumeration = enumeration;
- }
-
- /**
- * Returns the nestedObject.
- * @return Object
- */
- public Object getNestedObject() {
- return nestedObject;
- }
-
- /**
- * Sets the nestedObject.
- * @param nestedObject The nestedObject to set
- */
- public void setNestedObject(Object nestedObject) {
- this.nestedObject = nestedObject;
- }
-
- /**
- * Returns the collection.
- * @return Collection
- */
- public Collection getCollection() {
- return collection;
- }
-
- /**
- * Sets the collection.
- * @param collection The collection to set
- */
- public void setCollection(Collection collection) {
- this.collection = collection;
- }
-
- /**
- * Returns the doubleValue.
- * @return Double
- */
- public Double getDoubleValue() {
- return doubleValue;
- }
-
- /**
- * Returns the integerValue.
- * @return Integer
- */
- public Integer getIntegerValue() {
- return integerValue;
- }
-
- /**
- * Sets the doubleValue.
- * @param doubleValue The doubleValue to set
- */
- public void setDoubleValue(Double doubleValue) {
- this.doubleValue = doubleValue;
- }
-
- /**
- * Sets the integerValue.
- * @param integerValue The integerValue to set
- */
- public void setIntegerValue(Integer integerValue) {
- this.integerValue = integerValue;
- }
-
- /**
- * Returns the checked.
- * @return boolean
- */
- public boolean isChecked() {
- return checked;
- }
-
- /**
- * Sets the checked.
- * @param checked The checked to set
- */
- public void setChecked(boolean checked) {
- this.checked = checked;
- }
-
- /**
- * Returns the checkedWrapper.
- * @return Boolean
- */
- public Boolean getCheckedWrapper() {
- return checkedWrapper;
- }
-
- /**
- * Sets the checkedWrapper.
- * @param checkedWrapper The checkedWrapper to set
- */
- public void setCheckedWrapper(Boolean checkedWrapper) {
- this.checkedWrapper = checkedWrapper;
- }
-
- /**
- * Returns the x.
- * @return String
- */
- public String getX() {
- return x;
- }
-
- /**
- * Returns the y.
- * @return String
- */
- public String getY() {
- return y;
- }
-
- /**
- * Sets the x.
- * @param x The x to set
- */
- public void setX(String x) {
- this.x = x;
- }
-
- /**
- * Sets the y.
- * @param y The y to set
- */
- public void setY(String y) {
- this.y = y;
- }
-
- public String getJustThrowAnException() throws Exception{
+ public SimpleBeanForTesting() {
+ super();
+ }
+
+ public SimpleBeanForTesting(List lst) {
+ this.lst = lst;
+ }
+
+ public SimpleBeanForTesting(boolean checked) {
+ this.checked = checked;
+ }
+
+ public SimpleBeanForTesting(Boolean checkedWrapper) {
+ this.checkedWrapper = checkedWrapper;
+ }
+
+ public SimpleBeanForTesting(Map map) {
+ this.map = map;
+ }
+
+ public SimpleBeanForTesting(String string) {
+ this.string = string;
+ }
+
+ public SimpleBeanForTesting(String[] stringArray) {
+ this.stringArray = stringArray;
+ }
+
+ public SimpleBeanForTesting(Integer integerValue) {
+ this.integerValue = integerValue;
+ }
+
+ private String string;
+ private String[] stringArray;
+ private Integer integerValue;
+ private Double doubleValue;
+ private List lst;
+ private Map map;
+ private String x;
+ private String y;
+ private Object nestedObject;
+ private Object[] array;
+ private Enumeration enumeration;
+ private Collection collection;
+ private boolean checked;
+ private Boolean checkedWrapper;
+
+ //Copied right from the FAQ
+ private String strAry[] =
+ { "String 0", "String 1", "String 2", "String 3", "String 4" };
+
+ public String getStringIndexed(int index) {
+ return (strAry[index]);
+ }
+
+ public void setStringIndexed(int index, String value) {
+ strAry[index] = value;
+ }
+
+ /**
+ * Returns the lst.
+ *
+ * @return List
+ */
+ public List getList() {
+ return lst;
+ }
+
+ /**
+ * Returns the map.
+ *
+ * @return Map
+ */
+ public Map getMap() {
+ return map;
+ }
+
+ /**
+ * Sets the lst.
+ *
+ * @param lst The lst to set
+ */
+ public void setList(List lst) {
+ this.lst = lst;
+ }
+
+ /**
+ * Sets the map.
+ *
+ * @param map The map to set
+ */
+ public void setMap(Map map) {
+ this.map = map;
+ }
+
+ /**
+ * Returns the string.
+ *
+ * @return String
+ */
+ public String getString() {
+ return string;
+ }
+
+ /**
+ * Sets the string.
+ *
+ * @param string The string to set
+ */
+ public void setString(String string) {
+ this.string = string;
+ }
+
+ /**
+ * Returns an array of type String.
+ *
+ * @return String[]
+ */
+ public String[] getStringArray() {
+ return stringArray;
+ }
+
+ /**
+ * Sets the string array.
+ *
+ * @param string The string array to set
+ */
+ public void setStringArray(String[] stringArray) {
+ this.stringArray = stringArray;
+ }
+
+ /**
+ * Returns the lst.
+ *
+ * @return List
+ */
+ public List getLst() {
+ return lst;
+ }
+
+ /**
+ * Sets the lst.
+ *
+ * @param lst The lst to set
+ */
+ public void setLst(List lst) {
+ this.lst = lst;
+ }
+
+ /**
+ * Returns the Object Array.
+ *
+ * @return Object[]
+ */
+ public Object[] getArray() {
+ return array;
+ }
+
+ /**
+ * Sets the Object Array .
+ *
+ * @param array The Object array to set
+ */
+ public void setArray(Object[] array) {
+ this.array = array;
+ }
+
+ /**
+ * Returns the enumeration.
+ *
+ * @return Enumeration
+ */
+ public Enumeration getEnumeration() {
+ return enumeration;
+ }
+
+ /**
+ * Sets the enumeration.
+ *
+ * @param enumeration The enumeration to set
+ */
+ public void setEnumeration(Enumeration enumeration) {
+ this.enumeration = enumeration;
+ }
+
+ /**
+ * Returns the nestedObject.
+ *
+ * @return Object
+ */
+ public Object getNestedObject() {
+ return nestedObject;
+ }
+
+ /**
+ * Sets the nestedObject.
+ *
+ * @param nestedObject The nestedObject to set
+ */
+ public void setNestedObject(Object nestedObject) {
+ this.nestedObject = nestedObject;
+ }
+
+ /**
+ * Returns the collection.
+ *
+ * @return Collection
+ */
+ public Collection getCollection() {
+ return collection;
+ }
+
+ /**
+ * Sets the collection.
+ *
+ * @param collection The collection to set
+ */
+ public void setCollection(Collection collection) {
+ this.collection = collection;
+ }
+
+ /**
+ * Returns the doubleValue.
+ *
+ * @return Double
+ */
+ public Double getDoubleValue() {
+ return doubleValue;
+ }
+
+ /**
+ * Returns the integerValue.
+ *
+ * @return Integer
+ */
+ public Integer getIntegerValue() {
+ return integerValue;
+ }
+
+ /**
+ * Sets the doubleValue.
+ *
+ * @param doubleValue The doubleValue to set
+ */
+ public void setDoubleValue(Double doubleValue) {
+ this.doubleValue = doubleValue;
+ }
+
+ /**
+ * Sets the integerValue.
+ *
+ * @param integerValue The integerValue to set
+ */
+ public void setIntegerValue(Integer integerValue) {
+ this.integerValue = integerValue;
+ }
+
+ /**
+ * Returns the checked.
+ *
+ * @return boolean
+ */
+ public boolean isChecked() {
+ return checked;
+ }
+
+ /**
+ * Sets the checked.
+ *
+ * @param checked The checked to set
+ */
+ public void setChecked(boolean checked) {
+ this.checked = checked;
+ }
+
+ /**
+ * Returns the checkedWrapper.
+ *
+ * @return Boolean
+ */
+ public Boolean getCheckedWrapper() {
+ return checkedWrapper;
+ }
+
+ /**
+ * Sets the checkedWrapper.
+ *
+ * @param checkedWrapper The checkedWrapper to set
+ */
+ public void setCheckedWrapper(Boolean checkedWrapper) {
+ this.checkedWrapper = checkedWrapper;
+ }
+
+ /**
+ * Returns the x.
+ *
+ * @return String
+ */
+ public String getX() {
+ return x;
+ }
+
+ /**
+ * Returns the y.
+ *
+ * @return String
+ */
+ public String getY() {
+ return y;
+ }
+
+ /**
+ * Sets the x.
+ *
+ * @param x The x to set
+ */
+ public void setX(String x) {
+ this.x = x;
+ }
+
+ /**
+ * Sets the y.
+ *
+ * @param y The y to set
+ */
+ public void setY(String y) {
+ this.y = y;
+ }
+
+ public String getJustThrowAnException() throws Exception {
throw new Exception();
}
Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/SimpleFormBeanForTesting.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/SimpleFormBeanForTesting.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/SimpleFormBeanForTesting.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/SimpleFormBeanForTesting.java Fri Feb 10 13:05:03 2006
@@ -20,20 +20,21 @@
package org.apache.struts.taglib;
-import javax.servlet.http.HttpServletRequest;
-
import org.apache.struts.action.ActionMapping;
import org.apache.struts.validator.ValidatorForm;
+import javax.servlet.http.HttpServletRequest;
+
/**
- * Simple Form bean for the Cactus test cases.
- * Feel free to add whatever you need to help with testing.
+ * Simple Form bean for the Cactus test cases. Feel free to add whatever you
+ * need to help with testing.
*
- * @version $Rev$ $Date$
+ * @version $Rev$ $Date: 2004-10-16 12:38:42 -0400 (Sat, 16 Oct 2004)
+ * $
*/
-public final class SimpleFormBeanForTesting extends ValidatorForm {
+public final class SimpleFormBeanForTesting extends ValidatorForm {
private String field1 = null;
@@ -56,37 +57,40 @@
}
+ /**
+ * Returns the field1.
+ *
+ * @return String
+ */
+ public String getField1() {
+ return field1;
+ }
+
+ /**
+ * Returns the field2.
+ *
+ * @return String
+ */
+ public String getField2() {
+ return field2;
+ }
+
+ /**
+ * Sets the field1.
+ *
+ * @param field1 The field1 to set
+ */
+ public void setField1(String field1) {
+ this.field1 = field1;
+ }
- /**
- * Returns the field1.
- * @return String
- */
- public String getField1() {
- return field1;
- }
-
- /**
- * Returns the field2.
- * @return String
- */
- public String getField2() {
- return field2;
- }
-
- /**
- * Sets the field1.
- * @param field1 The field1 to set
- */
- public void setField1(String field1) {
- this.field1 = field1;
- }
-
- /**
- * Sets the field2.
- * @param field2 The field2 to set
- */
- public void setField2(String field2) {
- this.field2 = field2;
- }
+ /**
+ * Sets the field2.
+ *
+ * @param field2 The field2 to set
+ */
+ public void setField2(String field2) {
+ this.field2 = field2;
+ }
}
Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/TaglibTestBase.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/TaglibTestBase.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/TaglibTestBase.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/TaglibTestBase.java Fri Feb 10 13:05:03 2006
@@ -20,21 +20,21 @@
import junit.framework.Assert;
import junit.framework.Test;
import junit.framework.TestSuite;
-
import org.apache.cactus.JspTestCase;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.oro.text.perl.Perl5Util;
-public class TaglibTestBase extends JspTestCase{
-
+public class TaglibTestBase extends JspTestCase {
+
private static Log log = LogFactory.getLog(TaglibTestBase.class);
-
+
private Perl5Util perl = new Perl5Util();
-
+
public TaglibTestBase(String arg0) {
super(arg0);
}
+
// Return the tests included in this test suite
public static Test suite() {
return (new TestSuite(TaglibTestBase.class));
@@ -44,26 +44,27 @@
request.setAttribute("runTest", whichTest);
pageContext.forward(jsp);
}
-
- protected String replace(String source, String find, String replace){
-
+
+ protected String replace(String source, String find, String replace) {
+
return perl.substitute("s/" + find + "/" + replace + "/", source);
-
+
}
-
+
/**
* Utility method for reuse from the test JSPs.
- * @param expected The expected results for the test.
+ *
+ * @param expected The expected results for the test.
* @param compareTo The results to compare to the expected results.
- */
- public static void assertResults(String expected, String compareTo){
+ */
+ public static void assertResults(String expected, String compareTo) {
Perl5Util perl = new Perl5Util();
- expected = perl.substitute("s/[\\r\\n]//gmx", expected);
+ expected = perl.substitute("s/[\\r\\n]//gmx", expected);
compareTo = perl.substitute("s/[\\r\\n]//gmx", compareTo);
Assert.assertEquals(expected, compareTo);
}
-
- public static void fail(String msg){
+
+ public static void fail(String msg) {
Assert.fail(msg);
}
Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestCookieTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestCookieTag.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestCookieTag.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestCookieTag.java Fri Feb 10 13:05:03 2006
@@ -22,9 +22,8 @@
import org.apache.struts.taglib.TaglibTestBase;
/**
- * Suite of unit tests for the
- * <code>org.apache.struts.taglib.bean.CookieTag</code> class.
- *
+ * Suite of unit tests for the <code>org.apache.struts.taglib.bean.CookieTag</code>
+ * class.
*/
public class TestCookieTag extends TaglibTestBase {
@@ -46,7 +45,8 @@
* @param theArgs the arguments. Not used
*/
public static void main(String[] theArgs) {
- junit.awtui.TestRunner.main(new String[] {TestCookieTag.class.getName()});
+ junit.awtui.TestRunner
+ .main(new String[] { TestCookieTag.class.getName() });
}
/**
@@ -59,25 +59,24 @@
}
-
private void runMyTest(String whichTest) throws Exception {
request.setAttribute("runTest", whichTest);
- pageContext.forward("/org/apache/struts/taglib/bean/TestCookieTag.jsp");
+ pageContext
+ .forward("/org/apache/struts/taglib/bean/TestCookieTag.jsp");
}
private void formatAndTest(String compare, String output) {
//fix for introduced carriage return / line feeds
- output = replace(output,"\r","");
- output = replace(output,"\n","");
+ output = replace(output, "\r", "");
+ output = replace(output, "\n", "");
output = output.trim();
//System.out.println("Testing [" + compare + "] == [" + output + "]");
assertEquals(compare, output);
}
-
/*
- * Testing CookieTag, with Name specified in tags.
- */
+ * Testing CookieTag, with Name specified in tags.
+ */
/* FIXME: Cactus does not send cookies?
public void beginCookieTagName(WebRequest webRequest) {
webRequest.addCookie(COOKIE_KEY, COOKIE_VAL);
@@ -91,10 +90,9 @@
}
*/
-
/*
- * Testing CookieTag, with Name and Multiple specified in tags.
- */
+ * Testing CookieTag, with Name and Multiple specified in tags.
+ */
/* FIXME: Cactus does not send cookies?
public void beginCookieTagNameMultiple(WebRequest webRequest) {
for (int i = 0; i < 10; i++) {
Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestDefineTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestDefineTag.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestDefineTag.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestDefineTag.java Fri Feb 10 13:05:03 2006
@@ -17,24 +17,22 @@
*/
package org.apache.struts.taglib.bean;
-import javax.servlet.jsp.PageContext;
-
import junit.framework.Test;
import junit.framework.TestSuite;
-
import org.apache.cactus.WebResponse;
-import org.apache.struts.util.LabelValueBean;
import org.apache.struts.taglib.TaglibTestBase;
+import org.apache.struts.util.LabelValueBean;
+
+import javax.servlet.jsp.PageContext;
/**
- * Suite of unit tests for the
- * <code>org.apache.struts.taglib.bean.DefineTag</code> class.
- *
+ * Suite of unit tests for the <code>org.apache.struts.taglib.bean.DefineTag</code>
+ * class.
*/
public class TestDefineTag extends TaglibTestBase {
- protected final static String TEST_KEY = "TestDefineTag";
- protected final static String TEST_VALUE = "Test Value";
+ protected final static String TEST_KEY = "TestDefineTag";
+ protected final static String TEST_VALUE = "Test Value";
/**
* Defines the testcase name for JUnit.
@@ -51,7 +49,8 @@
* @param theArgs the arguments. Not used
*/
public static void main(String[] theArgs) {
- junit.awtui.TestRunner.main(new String[] {TestDefineTag.class.getName()});
+ junit.awtui.TestRunner
+ .main(new String[] { TestDefineTag.class.getName() });
}
/**
@@ -63,127 +62,151 @@
return new TestSuite(TestDefineTag.class);
}
- private void runMyTest(String whichTest) throws Exception{
+ private void runMyTest(String whichTest) throws Exception {
request.setAttribute("runTest", whichTest);
- pageContext.forward("/org/apache/struts/taglib/bean/TestDefineTag.jsp");
+ pageContext
+ .forward("/org/apache/struts/taglib/bean/TestDefineTag.jsp");
}
- private void formatAndTest(String compare, String output) {
- //fix for introduced carriage return / line feeds
- output = replace(output,"\r","");
- output = replace(output,"\n","");
- output = output.trim();
- assertEquals(compare, output);
- }
+ private void formatAndTest(String compare, String output) {
+ //fix for introduced carriage return / line feeds
+ output = replace(output, "\r", "");
+ output = replace(output, "\n", "");
+ output = output.trim();
+ assertEquals(compare, output);
+ }
/*
* Testing DefineTag using Application scope, with Application Scope specified in tags.
*/
public void testDefineNameApplicationScope() throws Exception {
- pageContext.setAttribute(TEST_KEY, TEST_VALUE, PageContext.APPLICATION_SCOPE);
+ pageContext.setAttribute(TEST_KEY,
+ TEST_VALUE,
+ PageContext.APPLICATION_SCOPE);
runMyTest("testDefineNameApplicationScope");
- }
- public void endDefineNameApplicationScope(WebResponse response){
- formatAndTest(TEST_VALUE, response.getText());
- }
+ }
+
+ public void endDefineNameApplicationScope(WebResponse response) {
+ formatAndTest(TEST_VALUE, response.getText());
+ }
public void testDefineNamePropertyApplicationScope() throws Exception {
LabelValueBean lvb = new LabelValueBean("key", TEST_VALUE);
- pageContext.setAttribute(TEST_KEY, lvb, PageContext.APPLICATION_SCOPE);
+ pageContext
+ .setAttribute(TEST_KEY, lvb, PageContext.APPLICATION_SCOPE);
runMyTest("testDefineNamePropertyApplicationScope");
- }
- public void endDefineNamePropertyApplicationScope(WebResponse response){
- formatAndTest(TEST_VALUE, response.getText());
- }
+ }
+
+ public void endDefineNamePropertyApplicationScope(WebResponse response) {
+ formatAndTest(TEST_VALUE, response.getText());
+ }
public void testDefineValueApplicationScope() throws Exception {
- LabelValueBean lvb = new LabelValueBean("key", TEST_VALUE + " this will be set to the correct value");
- pageContext.setAttribute(TEST_KEY, lvb, PageContext.APPLICATION_SCOPE);
+ LabelValueBean lvb = new LabelValueBean("key",
+ TEST_VALUE + " this will be set to the correct value");
+ pageContext
+ .setAttribute(TEST_KEY, lvb, PageContext.APPLICATION_SCOPE);
runMyTest("testDefineValueApplicationScope");
- }
- public void endDefineValueApplicationScope(WebResponse response){
- formatAndTest(TEST_VALUE, response.getText());
- }
+ }
+
+ public void endDefineValueApplicationScope(WebResponse response) {
+ formatAndTest(TEST_VALUE, response.getText());
+ }
public void testDefineBodyApplicationScope() throws Exception {
runMyTest("testDefineBodyApplicationScope");
- }
- public void endDefineBodyApplicationScope(WebResponse response){
- formatAndTest(TEST_VALUE, response.getText());
- }
+ }
+
+ public void endDefineBodyApplicationScope(WebResponse response) {
+ formatAndTest(TEST_VALUE, response.getText());
+ }
/*
* Testing DefineTag using Session scope, with Session Scope specified in tags.
*/
public void testDefineNameSessionScope() throws Exception {
- pageContext.setAttribute(TEST_KEY, TEST_VALUE, PageContext.SESSION_SCOPE);
+ pageContext.setAttribute(TEST_KEY,
+ TEST_VALUE,
+ PageContext.SESSION_SCOPE);
runMyTest("testDefineNameSessionScope");
- }
- public void endDefineNameSessionScope(WebResponse response){
- formatAndTest(TEST_VALUE, response.getText());
- }
+ }
+
+ public void endDefineNameSessionScope(WebResponse response) {
+ formatAndTest(TEST_VALUE, response.getText());
+ }
public void testDefineNamePropertySessionScope() throws Exception {
LabelValueBean lvb = new LabelValueBean("key", TEST_VALUE);
pageContext.setAttribute(TEST_KEY, lvb, PageContext.SESSION_SCOPE);
runMyTest("testDefineNamePropertySessionScope");
- }
- public void endDefineNamePropertySessionScope(WebResponse response){
- formatAndTest(TEST_VALUE, response.getText());
- }
+ }
+
+ public void endDefineNamePropertySessionScope(WebResponse response) {
+ formatAndTest(TEST_VALUE, response.getText());
+ }
public void testDefineValueSessionScope() throws Exception {
- LabelValueBean lvb = new LabelValueBean("key", TEST_VALUE + " this will be set to the correct value");
+ LabelValueBean lvb = new LabelValueBean("key",
+ TEST_VALUE + " this will be set to the correct value");
pageContext.setAttribute(TEST_KEY, lvb, PageContext.SESSION_SCOPE);
runMyTest("testDefineValueSessionScope");
- }
- public void endDefineValueSessionScope(WebResponse response){
- formatAndTest(TEST_VALUE, response.getText());
- }
+ }
+
+ public void endDefineValueSessionScope(WebResponse response) {
+ formatAndTest(TEST_VALUE, response.getText());
+ }
public void testDefineBodySessionScope() throws Exception {
runMyTest("testDefineBodySessionScope");
- }
- public void endDefineBodySessionScope(WebResponse response){
- formatAndTest(TEST_VALUE, response.getText());
- }
+ }
+
+ public void endDefineBodySessionScope(WebResponse response) {
+ formatAndTest(TEST_VALUE, response.getText());
+ }
/*
* Testing DefineTag using Request scope, with Request Scope specified in tags.
*/
public void testDefineNameRequestScope() throws Exception {
- pageContext.setAttribute(TEST_KEY, TEST_VALUE, PageContext.REQUEST_SCOPE);
+ pageContext.setAttribute(TEST_KEY,
+ TEST_VALUE,
+ PageContext.REQUEST_SCOPE);
runMyTest("testDefineNameRequestScope");
- }
- public void endDefineNameRequestScope(WebResponse response){
- formatAndTest(TEST_VALUE, response.getText());
- }
+ }
+
+ public void endDefineNameRequestScope(WebResponse response) {
+ formatAndTest(TEST_VALUE, response.getText());
+ }
public void testDefineNamePropertyRequestScope() throws Exception {
LabelValueBean lvb = new LabelValueBean("key", TEST_VALUE);
pageContext.setAttribute(TEST_KEY, lvb, PageContext.REQUEST_SCOPE);
runMyTest("testDefineNamePropertyRequestScope");
- }
- public void endDefineNamePropertyRequestScope(WebResponse response){
- formatAndTest(TEST_VALUE, response.getText());
- }
+ }
+
+ public void endDefineNamePropertyRequestScope(WebResponse response) {
+ formatAndTest(TEST_VALUE, response.getText());
+ }
public void testDefineValueRequestScope() throws Exception {
- LabelValueBean lvb = new LabelValueBean("key", TEST_VALUE + " this will be set to the correct value");
+ LabelValueBean lvb = new LabelValueBean("key",
+ TEST_VALUE + " this will be set to the correct value");
pageContext.setAttribute(TEST_KEY, lvb, PageContext.REQUEST_SCOPE);
runMyTest("testDefineValueRequestScope");
- }
- public void endDefineValueRequestScope(WebResponse response){
- formatAndTest(TEST_VALUE, response.getText());
- }
+ }
+
+ public void endDefineValueRequestScope(WebResponse response) {
+ formatAndTest(TEST_VALUE, response.getText());
+ }
public void testDefineBodyRequestScope() throws Exception {
runMyTest("testDefineBodyRequestScope");
- }
- public void endDefineBodyRequestScope(WebResponse response){
- formatAndTest(TEST_VALUE, response.getText());
- }
+ }
+
+ public void endDefineBodyRequestScope(WebResponse response) {
+ formatAndTest(TEST_VALUE, response.getText());
+ }
/*
* Testing DefineTag using Request scope, with no Scope specified in tags.
@@ -191,37 +214,40 @@
public void testDefineNameNoScope() throws Exception {
request.setAttribute(TEST_KEY, TEST_VALUE);
runMyTest("testDefineNameNoScope");
- }
- public void endDefineNameNoScope(WebResponse response){
- formatAndTest(TEST_VALUE, response.getText());
- }
+ }
+
+ public void endDefineNameNoScope(WebResponse response) {
+ formatAndTest(TEST_VALUE, response.getText());
+ }
public void testDefineNamePropertyNoScope() throws Exception {
LabelValueBean lvb = new LabelValueBean("key", TEST_VALUE);
request.setAttribute(TEST_KEY, lvb);
runMyTest("testDefineNamePropertyNoScope");
- }
- public void endDefineNamePropertyNoScope(WebResponse response){
- formatAndTest(TEST_VALUE, response.getText());
- }
+ }
+
+ public void endDefineNamePropertyNoScope(WebResponse response) {
+ formatAndTest(TEST_VALUE, response.getText());
+ }
public void testDefineValueNoScope() throws Exception {
- LabelValueBean lvb = new LabelValueBean("key", TEST_VALUE + " this will be set to the correct value");
+ LabelValueBean lvb = new LabelValueBean("key",
+ TEST_VALUE + " this will be set to the correct value");
request.setAttribute(TEST_KEY, lvb);
runMyTest("testDefineValueNoScope");
- }
- public void endDefineValueNoScope(WebResponse response){
- formatAndTest(TEST_VALUE, response.getText());
- }
+ }
+
+ public void endDefineValueNoScope(WebResponse response) {
+ formatAndTest(TEST_VALUE, response.getText());
+ }
public void testDefineBodyNoScope() throws Exception {
runMyTest("testDefineBodyNoScope");
- }
- public void endDefineBodyNoScope(WebResponse response){
- formatAndTest(TEST_VALUE, response.getText());
- }
-
+ }
+ public void endDefineBodyNoScope(WebResponse response) {
+ formatAndTest(TEST_VALUE, response.getText());
+ }
}
Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestHeaderTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestHeaderTag.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestHeaderTag.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestHeaderTag.java Fri Feb 10 13:05:03 2006
@@ -19,15 +19,13 @@
import junit.framework.Test;
import junit.framework.TestSuite;
-
import org.apache.cactus.WebRequest;
import org.apache.cactus.WebResponse;
import org.apache.struts.taglib.TaglibTestBase;
/**
- * Suite of unit tests for the
- * <code>org.apache.struts.taglib.bean.HeaderTag</code> class.
- *
+ * Suite of unit tests for the <code>org.apache.struts.taglib.bean.HeaderTag</code>
+ * class.
*/
public class TestHeaderTag extends TaglibTestBase {
@@ -49,7 +47,8 @@
* @param theArgs the arguments. Not used
*/
public static void main(String[] theArgs) {
- junit.awtui.TestRunner.main(new String[] {TestHeaderTag.class.getName()});
+ junit.awtui.TestRunner
+ .main(new String[] { TestHeaderTag.class.getName() });
}
/**
@@ -62,32 +61,35 @@
}
private void runMyTest(String whichTest) throws Exception {
- request.setAttribute("runTest", whichTest);
- pageContext.forward("/org/apache/struts/taglib/bean/TestHeaderTag.jsp");
+ request.setAttribute("runTest", whichTest);
+ pageContext
+ .forward("/org/apache/struts/taglib/bean/TestHeaderTag.jsp");
}
- private void formatAndTest(String compare, String output) {
- //fix for introduced carriage return / line feeds
- output = replace(output,"\r","");
- output = replace(output,"\n","");
- output = output.trim();
- assertEquals(compare, output);
- }
+ private void formatAndTest(String compare, String output) {
+ //fix for introduced carriage return / line feeds
+ output = replace(output, "\r", "");
+ output = replace(output, "\n", "");
+ output = output.trim();
+ assertEquals(compare, output);
+ }
/*
* Testing HeaderTag, with Name specified in tags.
*/
public void beginHeaderTagName(WebRequest webRequest) {
- webRequest.addHeader(HEADER_KEY, HEADER_VAL);
+ webRequest.addHeader(HEADER_KEY, HEADER_VAL);
webRequest.addParameter("cacheId", "1");
}
+
public void testHeaderTagName() throws Exception {
runMyTest("testHeaderTagName");
- }
- public void endHeaderTagName(WebResponse response){
- formatAndTest(HEADER_VAL, response.getText());
- }
+ }
+
+ public void endHeaderTagName(WebResponse response) {
+ formatAndTest(HEADER_VAL, response.getText());
+ }
/*
@@ -95,23 +97,25 @@
*/
public void beginHeaderTagNameMultiple(WebRequest webRequest) {
for (int i = 0; i < 10; i++) {
- webRequest.addHeader(HEADER_KEY, HEADER_VAL + i);
- }
+ webRequest.addHeader(HEADER_KEY, HEADER_VAL + i);
+ }
webRequest.addParameter("cacheId", "1");
}
+
public void testHeaderTagNameMultiple() throws Exception {
runMyTest("testHeaderTagNameMultiple");
- }
- public void endHeaderTagNameMultiple(WebResponse response){
- String compareTo = "";
- //Multiple Headers are comma delimited
+ }
+
+ public void endHeaderTagNameMultiple(WebResponse response) {
+ String compareTo = "";
+ //Multiple Headers are comma delimited
for (int i = 0; i < 10; i++) {
- compareTo += HEADER_VAL + i + ",";
- }
- //remove the trailing comma
- compareTo = compareTo.substring(0, compareTo.length() - 1);
- formatAndTest(compareTo, response.getText());
+ compareTo += HEADER_VAL + i + ",";
}
+ //remove the trailing comma
+ compareTo = compareTo.substring(0, compareTo.length() - 1);
+ formatAndTest(compareTo, response.getText());
+ }
/*
* Testing HeaderTag, with Name and Value specified in tags.
@@ -119,15 +123,14 @@
public void beginHeaderTagNameValue(WebRequest webRequest) {
webRequest.addParameter("cacheId", "1");
}
+
public void testHeaderTagNameValue() throws Exception {
runMyTest("testHeaderTagNameValue");
- }
- public void endHeaderTagNameValue(WebResponse response){
- formatAndTest(HEADER_VAL, response.getText());
- }
-
-
+ }
+ public void endHeaderTagNameValue(WebResponse response) {
+ formatAndTest(HEADER_VAL, response.getText());
+ }
}
Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestIncludeTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestIncludeTag.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestIncludeTag.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestIncludeTag.java Fri Feb 10 13:05:03 2006
@@ -22,9 +22,8 @@
import org.apache.struts.taglib.TaglibTestBase;
/**
- * Suite of unit tests for the
- * <code>org.apache.struts.taglib.bean.IncludeTag</code> class.
- *
+ * Suite of unit tests for the <code>org.apache.struts.taglib.bean.IncludeTag</code>
+ * class.
*/
public class TestIncludeTag extends TaglibTestBase {
@@ -43,7 +42,8 @@
* @param theArgs the arguments. Not used
*/
public static void main(String[] theArgs) {
- junit.awtui.TestRunner.main(new String[] {TestIncludeTag.class.getName()});
+ junit.awtui.TestRunner
+ .main(new String[] { TestIncludeTag.class.getName() });
}
/**
@@ -58,36 +58,37 @@
private void runMyTest(String whichTest) throws Exception {
request.setAttribute("runTest", whichTest);
pageContext.forward(
- request.getRequestURI() + "/org/apache/struts/taglib/bean/TestIncludeTag.jsp");
+ request.getRequestURI()
+ + "/org/apache/struts/taglib/bean/TestIncludeTag.jsp");
}
/*
* Testing IncludeTag using the forward attribute.
*/
public void testIncludeTagForward() throws Exception {
- //@TODO problem with Cactus' request wrapper causing wrong value when request.getServerPort()
+ //@TODO problem with Cactus' request wrapper causing wrong value when request.getServerPort()
// System.out.println("[TestIncludeTag.java]========>request.getServerPort():" + request.getServerPort());
// System.out.println("[TestIncludeTag.java]========>request.getRequestURI():" + request.getRequestURI());
// System.out.println("[TestIncludeTag.java]========>request.getRequestURL():" + request.getRequestURL());
// System.out.println("[TestIncludeTag.java]========>request.getQueryString():" + request.getQueryString());
// runMyTest("testIncludeTagForward");
- }
+ }
/*
* Testing IncludeTag using the href attribute.
*/
public void testIncludeTagHref() throws Exception {
- //@TODO problem with Cactus' request wrapper causing wrong value when request.getServerPort()
+ //@TODO problem with Cactus' request wrapper causing wrong value when request.getServerPort()
// runMyTest("testIncludeTagHref");
- }
+ }
/*
* Testing IncludeTag using the page attribute
*/
public void testIncludeTagPage() throws Exception {
- //@TODO problem with Cactus' request wrapper causing wrong value when request.getServerPort()
+ //@TODO problem with Cactus' request wrapper causing wrong value when request.getServerPort()
// runMyTest("testIncludeTagPage");
- }
+ }
}
Modified: struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag.java?rev=376846&r1=376845&r2=376846&view=diff
==============================================================================
--- struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag.java (original)
+++ struts/taglib/trunk/src/test-cactus/org/apache/struts/taglib/bean/TestMessageTag.java Fri Feb 10 13:05:03 2006
@@ -17,29 +17,27 @@
*/
package org.apache.struts.taglib.bean;
-import java.util.Locale;
-
-import javax.servlet.jsp.PageContext;
-
import junit.framework.Test;
import junit.framework.TestSuite;
-
import org.apache.cactus.WebResponse;
import org.apache.struts.Globals;
import org.apache.struts.taglib.SimpleBeanForTesting;
import org.apache.struts.taglib.TaglibTestBase;
+import javax.servlet.jsp.PageContext;
+import java.util.Locale;
+
/**
- * These tests attempt to cover every single possible configuration of the
- * org.apache.struts.taglib.bean.MessageTag
- *
- * I've tried to describe what I'm testing as best as possible by the method names.
- * To see how I'm testing, refer to the jsp file that these tests forward to.
- *
- * All of these tests depend on a value being correctly written on the repose, then
- * checked here in endXXX method.
- *
- */
+ * These tests attempt to cover every single possible configuration of the
+ * org.apache.struts.taglib.bean.MessageTag
+ *
+ * I've tried to describe what I'm testing as best as possible by the method
+ * names. To see how I'm testing, refer to the jsp file that these tests
+ * forward to.
+ *
+ * All of these tests depend on a value being correctly written on the repose,
+ * then checked here in endXXX method.
+ */
public class TestMessageTag extends TaglibTestBase {
protected final static String TEST_KEY = "BeanKey";
@@ -55,7 +53,8 @@
* @param theArgs the arguments. Not used
*/
public static void main(String[] theArgs) {
- junit.awtui.TestRunner.main(new String[] {TestMessageTag.class.getName()});
+ junit.awtui.TestRunner
+ .main(new String[] { TestMessageTag.class.getName() });
}
/**
@@ -68,19 +67,22 @@
}
private void runMyTest(String whichTest, Locale locale) throws Exception {
- pageContext.setAttribute(Globals.LOCALE_KEY, locale, PageContext.SESSION_SCOPE);
+ pageContext.setAttribute(Globals.LOCALE_KEY,
+ locale,
+ PageContext.SESSION_SCOPE);
request.setAttribute("runTest", whichTest);
- pageContext.forward("/org/apache/struts/taglib/bean/TestMessageTag.jsp");
+ pageContext
+ .forward("/org/apache/struts/taglib/bean/TestMessageTag.jsp");
}
- private void formatAndTest(String compare, String output) {
- //fix for introduced carriage return / line feeds
- output = replace(output,"\r","");
- output = replace(output,"\n","");
- output = output.trim();
- //System.out.println("Testing [" + compare + "] == [" + output + "]");
- assertEquals(compare, output);
- }
+ private void formatAndTest(String compare, String output) {
+ //fix for introduced carriage return / line feeds
+ output = replace(output, "\r", "");
+ output = replace(output, "\n", "");
+ output = output.trim();
+ //System.out.println("Testing [" + compare + "] == [" + output + "]");
+ assertEquals(compare, output);
+ }
/*
* ===========================================================
@@ -93,195 +95,300 @@
*/
- public void testMessageTagNoArgKeyNoScopeDefaultBundle() throws Exception {
- runMyTest("testMessageTagNoArgKeyNoScopeDefaultBundle", new Locale("",""));
- }
- public void endMessageTagNoArgKeyNoScopeDefaultBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
-
- public void testMessageTagNoArgKeyApplicationScopeDefaultBundle() throws Exception {
- runMyTest("testMessageTagNoArgKeyApplicationScopeDefaultBundle", new Locale("",""));
- }
- public void endMessageTagNoArgKeyApplicationScopeDefaultBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
-
- public void testMessageTagNoArgKeySessionScopeDefaultBundle() throws Exception {
- runMyTest("testMessageTagNoArgKeySessionScopeDefaultBundle", new Locale("",""));
- }
- public void endMessageTagNoArgKeySessionScopeDefaultBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
-
- public void testMessageTagNoArgKeyRequestScopeDefaultBundle() throws Exception {
- runMyTest("testMessageTagNoArgKeyRequestScopeDefaultBundle", new Locale("",""));
- }
- public void endMessageTagNoArgKeyRequestScopeDefaultBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
-
-
- public void testMessageTagNoArgKeyNoScopeAlternateBundle() throws Exception {
- runMyTest("testMessageTagNoArgKeyNoScopeAlternateBundle", new Locale("",""));
- }
- public void endMessageTagNoArgKeyNoScopeAlternateBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
-
- public void testMessageTagNoArgKeyApplicationScopeAlternateBundle() throws Exception {
- runMyTest("testMessageTagNoArgKeyApplicationScopeAlternateBundle", new Locale("",""));
- }
- public void endMessageTagNoArgKeyApplicationScopeAlternateBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
-
- public void testMessageTagNoArgKeySessionScopeAlternateBundle() throws Exception {
- runMyTest("testMessageTagNoArgKeySessionScopeAlternateBundle", new Locale("",""));
- }
- public void endMessageTagNoArgKeySessionScopeAlternateBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
-
- public void testMessageTagNoArgKeyRequestScopeAlternateBundle() throws Exception {
- runMyTest("testMessageTagNoArgKeyRequestScopeAlternateBundle", new Locale("",""));
- }
- public void endMessageTagNoArgKeyRequestScopeAlternateBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
-
-
-
- public void testMessageTagNoArgNameNoScopeDefaultBundle() throws Exception {
- runMyTest("testMessageTagNoArgNameNoScopeDefaultBundle", new Locale("",""));
- }
- public void endMessageTagNoArgNameNoScopeDefaultBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
-
- public void testMessageTagNoArgNameApplicationScopeDefaultBundle() throws Exception {
- runMyTest("testMessageTagNoArgNameApplicationScopeDefaultBundle", new Locale("",""));
- }
- public void endMessageTagNoArgNameApplicationScopeDefaultBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
-
- public void testMessageTagNoArgNameSessionScopeDefaultBundle() throws Exception {
- runMyTest("testMessageTagNoArgNameSessionScopeDefaultBundle", new Locale("",""));
- }
- public void endMessageTagNoArgNameSessionScopeDefaultBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
-
- public void testMessageTagNoArgNameRequestScopeDefaultBundle() throws Exception {
- runMyTest("testMessageTagNoArgNameRequestScopeDefaultBundle", new Locale("",""));
- }
- public void endMessageTagNoArgNameRequestScopeDefaultBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
-
-
- public void testMessageTagNoArgNameNoScopeAlternateBundle() throws Exception {
- runMyTest("testMessageTagNoArgNameNoScopeAlternateBundle", new Locale("",""));
- }
- public void endMessageTagNoArgNameNoScopeAlternateBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
-
- public void testMessageTagNoArgNameApplicationScopeAlternateBundle() throws Exception {
- runMyTest("testMessageTagNoArgNameApplicationScopeAlternateBundle", new Locale("",""));
- }
- public void endMessageTagNoArgNameApplicationScopeAlternateBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
-
- public void testMessageTagNoArgNameSessionScopeAlternateBundle() throws Exception {
- runMyTest("testMessageTagNoArgNameSessionScopeAlternateBundle", new Locale("",""));
- }
- public void endMessageTagNoArgNameSessionScopeAlternateBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
-
- public void testMessageTagNoArgNameRequestScopeAlternateBundle() throws Exception {
- runMyTest("testMessageTagNoArgNameRequestScopeAlternateBundle", new Locale("",""));
- }
- public void endMessageTagNoArgNameRequestScopeAlternateBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
-
-
-
-
- public void testMessageTagNoArgNamePropertyNoScopeDefaultBundle() throws Exception {
- pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message"), PageContext.REQUEST_SCOPE);
- runMyTest("testMessageTagNoArgNamePropertyNoScopeDefaultBundle", new Locale("",""));
- }
- public void endMessageTagNoArgNamePropertyNoScopeDefaultBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
-
- public void testMessageTagNoArgNamePropertyApplicationScopeDefaultBundle() throws Exception {
- pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message"), PageContext.APPLICATION_SCOPE);
- runMyTest("testMessageTagNoArgNamePropertyApplicationScopeDefaultBundle", new Locale("",""));
- }
- public void endMessageTagNoArgNamePropertyApplicationScopeDefaultBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
-
- public void testMessageTagNoArgNamePropertySessionScopeDefaultBundle() throws Exception {
- pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message"), PageContext.SESSION_SCOPE);
- runMyTest("testMessageTagNoArgNamePropertySessionScopeDefaultBundle", new Locale("",""));
- }
- public void endMessageTagNoArgNamePropertySessionScopeDefaultBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
-
- public void testMessageTagNoArgNamePropertyRequestScopeDefaultBundle() throws Exception {
- pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message"), PageContext.REQUEST_SCOPE);
- runMyTest("testMessageTagNoArgNamePropertyRequestScopeDefaultBundle", new Locale("",""));
- }
- public void endMessageTagNoArgNamePropertyRequestScopeDefaultBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
-
-
- public void testMessageTagNoArgNamePropertyNoScopeAlternateBundle() throws Exception {
- pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message"), PageContext.REQUEST_SCOPE);
- runMyTest("testMessageTagNoArgNamePropertyNoScopeAlternateBundle", new Locale("",""));
- }
- public void endMessageTagNoArgNamePropertyNoScopeAlternateBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
-
- public void testMessageTagNoArgNamePropertyApplicationScopeAlternateBundle() throws Exception {
- pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message"), PageContext.APPLICATION_SCOPE);
- runMyTest("testMessageTagNoArgNamePropertyApplicationScopeAlternateBundle", new Locale("",""));
- }
- public void endMessageTagNoArgNamePropertyApplicationScopeAlternateBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
-
- public void testMessageTagNoArgNamePropertySessionScopeAlternateBundle() throws Exception {
- pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message"), PageContext.SESSION_SCOPE);
- runMyTest("testMessageTagNoArgNamePropertySessionScopeAlternateBundle", new Locale("",""));
- }
- public void endMessageTagNoArgNamePropertySessionScopeAlternateBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
-
- public void testMessageTagNoArgNamePropertyRequestScopeAlternateBundle() throws Exception {
- pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message"), PageContext.REQUEST_SCOPE);
- runMyTest("testMessageTagNoArgNamePropertyRequestScopeAlternateBundle", new Locale("",""));
- }
- public void endMessageTagNoArgNamePropertyRequestScopeAlternateBundle(WebResponse response){
- formatAndTest(TEST_VAL, response.getText());
- }
+ public void testMessageTagNoArgKeyNoScopeDefaultBundle()
+ throws Exception {
+ runMyTest("testMessageTagNoArgKeyNoScopeDefaultBundle",
+ new Locale("", ""));
+ }
+
+ public void endMessageTagNoArgKeyNoScopeDefaultBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
+
+ public void testMessageTagNoArgKeyApplicationScopeDefaultBundle()
+ throws Exception {
+ runMyTest("testMessageTagNoArgKeyApplicationScopeDefaultBundle",
+ new Locale("", ""));
+ }
+
+ public void endMessageTagNoArgKeyApplicationScopeDefaultBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
+
+ public void testMessageTagNoArgKeySessionScopeDefaultBundle()
+ throws Exception {
+ runMyTest("testMessageTagNoArgKeySessionScopeDefaultBundle",
+ new Locale("", ""));
+ }
+
+ public void endMessageTagNoArgKeySessionScopeDefaultBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
+
+ public void testMessageTagNoArgKeyRequestScopeDefaultBundle()
+ throws Exception {
+ runMyTest("testMessageTagNoArgKeyRequestScopeDefaultBundle",
+ new Locale("", ""));
+ }
+
+ public void endMessageTagNoArgKeyRequestScopeDefaultBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
+
+
+ public void testMessageTagNoArgKeyNoScopeAlternateBundle()
+ throws Exception {
+ runMyTest("testMessageTagNoArgKeyNoScopeAlternateBundle",
+ new Locale("", ""));
+ }
+
+ public void endMessageTagNoArgKeyNoScopeAlternateBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
+
+ public void testMessageTagNoArgKeyApplicationScopeAlternateBundle()
+ throws Exception {
+ runMyTest("testMessageTagNoArgKeyApplicationScopeAlternateBundle",
+ new Locale("", ""));
+ }
+
+ public void endMessageTagNoArgKeyApplicationScopeAlternateBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
+
+ public void testMessageTagNoArgKeySessionScopeAlternateBundle()
+ throws Exception {
+ runMyTest("testMessageTagNoArgKeySessionScopeAlternateBundle",
+ new Locale("", ""));
+ }
+
+ public void endMessageTagNoArgKeySessionScopeAlternateBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
+
+ public void testMessageTagNoArgKeyRequestScopeAlternateBundle()
+ throws Exception {
+ runMyTest("testMessageTagNoArgKeyRequestScopeAlternateBundle",
+ new Locale("", ""));
+ }
+ public void endMessageTagNoArgKeyRequestScopeAlternateBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
+ public void testMessageTagNoArgNameNoScopeDefaultBundle()
+ throws Exception {
+ runMyTest("testMessageTagNoArgNameNoScopeDefaultBundle",
+ new Locale("", ""));
+ }
+ public void endMessageTagNoArgNameNoScopeDefaultBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
+ public void testMessageTagNoArgNameApplicationScopeDefaultBundle()
+ throws Exception {
+ runMyTest("testMessageTagNoArgNameApplicationScopeDefaultBundle",
+ new Locale("", ""));
+ }
+ public void endMessageTagNoArgNameApplicationScopeDefaultBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
+
+ public void testMessageTagNoArgNameSessionScopeDefaultBundle()
+ throws Exception {
+ runMyTest("testMessageTagNoArgNameSessionScopeDefaultBundle",
+ new Locale("", ""));
+ }
+
+ public void endMessageTagNoArgNameSessionScopeDefaultBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
+
+ public void testMessageTagNoArgNameRequestScopeDefaultBundle()
+ throws Exception {
+ runMyTest("testMessageTagNoArgNameRequestScopeDefaultBundle",
+ new Locale("", ""));
+ }
+
+ public void endMessageTagNoArgNameRequestScopeDefaultBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
+
+
+ public void testMessageTagNoArgNameNoScopeAlternateBundle()
+ throws Exception {
+ runMyTest("testMessageTagNoArgNameNoScopeAlternateBundle",
+ new Locale("", ""));
+ }
+
+ public void endMessageTagNoArgNameNoScopeAlternateBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
+
+ public void testMessageTagNoArgNameApplicationScopeAlternateBundle()
+ throws Exception {
+ runMyTest("testMessageTagNoArgNameApplicationScopeAlternateBundle",
+ new Locale("", ""));
+ }
+
+ public void endMessageTagNoArgNameApplicationScopeAlternateBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
+
+ public void testMessageTagNoArgNameSessionScopeAlternateBundle()
+ throws Exception {
+ runMyTest("testMessageTagNoArgNameSessionScopeAlternateBundle",
+ new Locale("", ""));
+ }
+
+ public void endMessageTagNoArgNameSessionScopeAlternateBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
+
+ public void testMessageTagNoArgNameRequestScopeAlternateBundle()
+ throws Exception {
+ runMyTest("testMessageTagNoArgNameRequestScopeAlternateBundle",
+ new Locale("", ""));
+ }
+
+ public void endMessageTagNoArgNameRequestScopeAlternateBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
+
+
+ public void testMessageTagNoArgNamePropertyNoScopeDefaultBundle()
+ throws Exception {
+ pageContext.setAttribute("key",
+ new SimpleBeanForTesting("default.bundle.message"),
+ PageContext.REQUEST_SCOPE);
+ runMyTest("testMessageTagNoArgNamePropertyNoScopeDefaultBundle",
+ new Locale("", ""));
+ }
+
+ public void endMessageTagNoArgNamePropertyNoScopeDefaultBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
+
+ public void testMessageTagNoArgNamePropertyApplicationScopeDefaultBundle()
+ throws Exception {
+ pageContext.setAttribute("key",
+ new SimpleBeanForTesting("default.bundle.message"),
+ PageContext.APPLICATION_SCOPE);
+ runMyTest(
+ "testMessageTagNoArgNamePropertyApplicationScopeDefaultBundle",
+ new Locale("", ""));
+ }
+
+ public void endMessageTagNoArgNamePropertyApplicationScopeDefaultBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
+
+ public void testMessageTagNoArgNamePropertySessionScopeDefaultBundle()
+ throws Exception {
+ pageContext.setAttribute("key",
+ new SimpleBeanForTesting("default.bundle.message"),
+ PageContext.SESSION_SCOPE);
+ runMyTest("testMessageTagNoArgNamePropertySessionScopeDefaultBundle",
+ new Locale("", ""));
+ }
+
+ public void endMessageTagNoArgNamePropertySessionScopeDefaultBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
+
+ public void testMessageTagNoArgNamePropertyRequestScopeDefaultBundle()
+ throws Exception {
+ pageContext.setAttribute("key",
+ new SimpleBeanForTesting("default.bundle.message"),
+ PageContext.REQUEST_SCOPE);
+ runMyTest("testMessageTagNoArgNamePropertyRequestScopeDefaultBundle",
+ new Locale("", ""));
+ }
+
+ public void endMessageTagNoArgNamePropertyRequestScopeDefaultBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
+
+
+ public void testMessageTagNoArgNamePropertyNoScopeAlternateBundle()
+ throws Exception {
+ pageContext.setAttribute("key",
+ new SimpleBeanForTesting("alternate.bundle.message"),
+ PageContext.REQUEST_SCOPE);
+ runMyTest("testMessageTagNoArgNamePropertyNoScopeAlternateBundle",
+ new Locale("", ""));
+ }
+
+ public void endMessageTagNoArgNamePropertyNoScopeAlternateBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
+
+ public void testMessageTagNoArgNamePropertyApplicationScopeAlternateBundle()
+ throws Exception {
+ pageContext.setAttribute("key",
+ new SimpleBeanForTesting("alternate.bundle.message"),
+ PageContext.APPLICATION_SCOPE);
+ runMyTest(
+ "testMessageTagNoArgNamePropertyApplicationScopeAlternateBundle",
+ new Locale("", ""));
+ }
+
+ public void endMessageTagNoArgNamePropertyApplicationScopeAlternateBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
+
+ public void testMessageTagNoArgNamePropertySessionScopeAlternateBundle()
+ throws Exception {
+ pageContext.setAttribute("key",
+ new SimpleBeanForTesting("alternate.bundle.message"),
+ PageContext.SESSION_SCOPE);
+ runMyTest("testMessageTagNoArgNamePropertySessionScopeAlternateBundle",
+ new Locale("", ""));
+ }
+
+ public void endMessageTagNoArgNamePropertySessionScopeAlternateBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
+
+ public void testMessageTagNoArgNamePropertyRequestScopeAlternateBundle()
+ throws Exception {
+ pageContext.setAttribute("key",
+ new SimpleBeanForTesting("alternate.bundle.message"),
+ PageContext.REQUEST_SCOPE);
+ runMyTest("testMessageTagNoArgNamePropertyRequestScopeAlternateBundle",
+ new Locale("", ""));
+ }
+
+ public void endMessageTagNoArgNamePropertyRequestScopeAlternateBundle(
+ WebResponse response) {
+ formatAndTest(TEST_VAL, response.getText());
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org