You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by jk...@apache.org on 2006/07/23 17:54:27 UTC
svn commit: r424760 -
/tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/form/TestSubmit.java
Author: jkuhnert
Date: Sun Jul 23 08:54:26 2006
New Revision: 424760
URL: http://svn.apache.org/viewvc?rev=424760&view=rev
Log:
Updated unit test
Modified:
tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/form/TestSubmit.java
Modified: tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/form/TestSubmit.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/form/TestSubmit.java?rev=424760&r1=424759&r2=424760&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/form/TestSubmit.java (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/form/TestSubmit.java Sun Jul 23 08:54:26 2006
@@ -319,18 +319,24 @@
public void testTriggerWithListener()
{
IActionListener listener = newListener();
- IForm form = newForm();
+ MockForm form = new MockForm();
IRequestCycle cycle = newCycle();
Creator creator = new Creator();
Submit submit = (Submit) creator.newInstance(Submit.class, new Object[]
{ "listener", listener, "listenerInvoker", new ListenerInvokerTerminator() });
+
+ replay();
+
+ submit.handleClick(cycle, form);
+ verify();
+
listener.actionTriggered(submit, cycle);
replay();
- submit.handleClick(cycle, form);
+ form.runDeferred();
verify();
}
@@ -434,17 +440,17 @@
Submit submit = (Submit) creator.newInstance(Submit.class, new Object[]
{ "listener", listener, "action", action, "listenerInvoker",
new ListenerInvokerTerminator() });
-
- listener.actionTriggered(submit, cycle);
replay();
submit.handleClick(cycle, form);
verify();
-
+
+ listener.actionTriggered(submit, cycle);
+
action.actionTriggered(submit, cycle);
-
+
replay();
form.runDeferred();