You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by gv...@apache.org on 2006/01/01 00:37:46 UTC
svn commit: r360460 -
/struts/shale/trunk/clay-plugin/src/test/org/apache/shale/clay/config/SymbolsTestCase.java
Author: gvanmatre
Date: Sat Dec 31 15:37:28 2005
New Revision: 360460
URL: http://svn.apache.org/viewcvs?rev=360460&view=rev
Log:
Added more symbol tests.
Modified:
struts/shale/trunk/clay-plugin/src/test/org/apache/shale/clay/config/SymbolsTestCase.java
Modified: struts/shale/trunk/clay-plugin/src/test/org/apache/shale/clay/config/SymbolsTestCase.java
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/clay-plugin/src/test/org/apache/shale/clay/config/SymbolsTestCase.java?rev=360460&r1=360459&r2=360460&view=diff
==============================================================================
--- struts/shale/trunk/clay-plugin/src/test/org/apache/shale/clay/config/SymbolsTestCase.java (original)
+++ struts/shale/trunk/clay-plugin/src/test/org/apache/shale/clay/config/SymbolsTestCase.java Sat Dec 31 15:37:28 2005
@@ -295,6 +295,41 @@
boolean isFinal = command.execute(clayContext);
assertEquals("command finished", isFinal, true);
assertEquals("value = 6743", child.getValue(), "6743");
+
+
+ //create a target component
+ child = (javax.faces.component.html.HtmlOutputText)
+ facesContext.getApplication().createComponent("javax.faces.HtmlOutputText");
+ assertNotNull("javax.faces.HtmlOutputText", child);
+
+ attr.setValue("@{a}@{ab}"); //symbolic attribute
+ displayElement.addSymbol("@{ab}", "43");
+ displayElement.addSymbol("@{a}", "67");
+
+ clayContext.setChild(child);
+
+ isFinal = command.execute(clayContext);
+ assertEquals("command finished", isFinal, true);
+ assertEquals("value = 6743", child.getValue(), "6743");
+
+
+
+ //create a target component
+ child = (javax.faces.component.html.HtmlOutputText)
+ facesContext.getApplication().createComponent("javax.faces.HtmlOutputText");
+ assertNotNull("javax.faces.HtmlOutputText", child);
+
+ attr.setValue("@(a)@(ab)"); //symbolic attribute
+ displayElement.addSymbol("@(ab)", "43");
+ displayElement.addSymbol("@(a)", "67");
+
+ clayContext.setChild(child);
+
+ isFinal = command.execute(clayContext);
+ assertEquals("command finished", isFinal, true);
+ assertEquals("value = 6743", child.getValue(), "6743");
+
+
}
//test symbol inheritance
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org