tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkuhn...@apache.org
Subject svn commit: r467782 - in /tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry: form/BaseFormComponentTestCase.java valid/FieldLabelTest.java
Date Wed, 25 Oct 2006 22:04:04 GMT
Author: jkuhnert
Date: Wed Oct 25 15:04:03 2006
New Revision: 467782

URL: http://svn.apache.org/viewvc?view=rev&rev=467782
Log:
Minor test enhancements.

Modified:
    tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/form/BaseFormComponentTestCase.java
    tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/valid/FieldLabelTest.java

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/form/BaseFormComponentTestCase.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/form/BaseFormComponentTestCase.java?view=diff&rev=467782&r1=467781&r2=467782
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/form/BaseFormComponentTestCase.java
(original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/form/BaseFormComponentTestCase.java
Wed Oct 25 15:04:03 2006
@@ -14,6 +14,7 @@
 
 package org.apache.tapestry.form;
 
+import static org.easymock.EasyMock.checkOrder;
 import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.expectLastCall;
 
@@ -48,7 +49,11 @@
 
     protected IForm newForm()
     {
-        return newMock(IForm.class);
+        IForm mock = newMock(IForm.class);
+        
+        checkOrder(mock, false);
+        
+        return mock;
     }
 
     protected void trainGetForm(IRequestCycle cycle, IForm form)

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/valid/FieldLabelTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/valid/FieldLabelTest.java?view=diff&rev=467782&r1=467781&r2=467782
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/valid/FieldLabelTest.java
(original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/valid/FieldLabelTest.java
Wed Oct 25 15:04:03 2006
@@ -49,7 +49,7 @@
     {
         expect(form.getDelegate()).andReturn(delegate);
     }
-
+    
     private IFormComponent newField(String displayName, String clientId)
     {
         IFormComponent field = newMock(IFormComponent.class);
@@ -64,12 +64,12 @@
 
     private void trainGetClientId(String clientId, IFormComponent field)
     {
-        expect(field.getClientId()).andReturn(clientId);
+        expect(field.getClientId()).andReturn(clientId).anyTimes();
     }
 
     private void trainGetDisplayName(IFormComponent field, String displayName)
     {
-        expect(field.getDisplayName()).andReturn(displayName);
+        expect(field.getDisplayName()).andReturn(displayName).anyTimes();
     }
 
     public void testRewinding()
@@ -296,7 +296,7 @@
 
         verify();
     }
-
+    
     public void testNoDisplayNameInField()
     {
         IForm form = newForm();



Mime
View raw message