See
http://svn.sourceforge.net/viewcvs.cgi/tacos/trunk/src/test/net/sf/tacos/test/TestBase.java?view=log
and
http://svn.sourceforge.net/viewcvs.cgi/tacos/trunk/src/test/net/sf/tacos/ajax/components/AjaxDirectLinkTest.java?view=log

Maybe beta-3 is gonna be the refactoring release.
There are some java changes i also have in mind + many many javascript
ones that will greatly reduce
response size.

Felix Sun wrote:

> thanks andy, I am waiting for samples, :)
>
> On 4/17/06, *Andreas Andreou* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     This
>     http://howardlewisship.com/tapestry-javaforge/tapestry-testng/index.html
>     would be nice but it requires EasyMock 2.0 which needs Java 1.5
>
>     On the other hand org.apache.tapestry.BaseComponentTestCase found on
>     tapestry's
>     framework/src/test is based on junit.
>
>     Anyway, i've copied it in tacos + made it use testng...
>     i'm trying to test AjaxDirectLink and if it works nicely, i'll
>     commit it
>
>     Felix Sun wrote:
>
>     > Hi All
>     >
>     >
>     > I am thinking on do some refactor on AjaxDirectLink , AjaxSubmit,
>     > AjaxEventSubmit...
>     > and the so many similar components that all have effects,
>     > statusElement, popup ...,
>     > because I am going to add a new component that may have these
>     > parameter, (AjaxAutoRefresh)
>     >
>     > that would be introduce a new interface something like
>     AjaxInvoke or
>     > AjaxParameter, and make those components to implement.
>     >
>     > public interface AjaxParameter {
>     >
>     >     public abstract Collection getUpdateComponents();
>     >
>     >     public abstract Collection getUpdateBlocks();
>     >
>     >     public abstract String getUpdateObject();
>     >
>     >     public abstract boolean isDirect();
>     >
>     >     public abstract String getEffects();
>     >
>     >     public abstract String getStatusElement();
>     >
>     >     public abstract String getPreEffects();
>     >
>     >     public abstract String getPopup();
>     > }
>     >
>     > and add some util method to cut out the duplicated code like:
>     >
>     >             if (getUpdateObject() != null)
>     >                 parmMap.put("updateObject", getUpdateObject());
>     >             else
>     >                 parmMap.put("updateObject", "null");
>     >             if (getEffects() != null) {
>     >                 parmMap.put("effects", ScriptUtils
>     >                         .escapeJavaScriptHash(getEffects()));
>     >             } else {
>     >                 parmMap.put("effects", "{}");
>     >             }
>     >             if (getPreEffects() != null) {
>     >                 parmMap.put("preEffects",
>     > EffectStringUtils.createPreEffectsScript(
>     >                         getPreEffects(), getUpdateComponents()));
>     >             }
>     >             if (getPopup() != null) {
>     >                 parmMap.put("popup",
>     > ScriptUtils.escapeJavaScriptHash(getPopup()));
>     >             }
>     >             if (getBackLink() != null)
>     >
>     > that may be :
>     >      someUtils.generateAjaxParameter(this)
>     >
>     >
>     > I am not sure whether this method works.  so I want to write some
>     > tests on those components, and to protect my refactorings.
>     > but writing test on tapestry component sames difficult. So does
>     anyone
>     > knows how to test tapestry component,
>     >  I think it is not as simple as TestAny etc in tapestry source
>     > directory when testing AjaxDirectLink.
>     >
>     > Should we apply the TDD practice on developing tacos?
>     >
>     >
>     >
>     >
>     >
>
>
>     -------------------------------------------------------
>     This SF.Net email is sponsored by xPML, a groundbreaking scripting
>     language
>     that extends applications into web and mobile media. Attend the
>     live webcast
>     and join the prime developer group breaking into this new coding
>     territory!
>     http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
>     <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642>
>     _______________________________________________
>     Tacos-devel mailing list
>     Tacos-devel@lists.sourceforge.net
>     <mailto:Tacos-devel@lists.sourceforge.net>
>     https://lists.sourceforge.net/lists/listinfo/tacos-devel
>
>


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Tacos-devel mailing list
Tacos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tacos-devel

Reply via email to