Updated Branches:
  refs/heads/master e954445f9 -> 18b6f2be1

RESOLVED - TAP5-2101: BeanEditor should always provide a new
BeanValidationContext (JSR-303) 
- fix failing test


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/18b6f2be
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/18b6f2be
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/18b6f2be

Branch: refs/heads/master
Commit: 18b6f2be1c6c6a1842300944dd3bb18da27d91d0
Parents: e954445
Author: kaosko <[email protected]>
Authored: Mon Apr 15 23:52:15 2013 -0700
Committer: kaosko <[email protected]>
Committed: Mon Apr 15 23:52:15 2013 -0700

----------------------------------------------------------------------
 .../corelib/components/BeanEditorTest.java         |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/18b6f2be/tapestry-core/src/test/java/org/apache/tapestry5/corelib/components/BeanEditorTest.java
----------------------------------------------------------------------
diff --git 
a/tapestry-core/src/test/java/org/apache/tapestry5/corelib/components/BeanEditorTest.java
 
b/tapestry-core/src/test/java/org/apache/tapestry5/corelib/components/BeanEditorTest.java
index c824180..2cfd46d 100644
--- 
a/tapestry-core/src/test/java/org/apache/tapestry5/corelib/components/BeanEditorTest.java
+++ 
b/tapestry-core/src/test/java/org/apache/tapestry5/corelib/components/BeanEditorTest.java
@@ -18,11 +18,14 @@ import static org.easymock.EasyMock.isA;
 
 import static org.easymock.EasyMock.eq;
 
+import static org.easymock.EasyMock.anyObject;
+
 import org.apache.tapestry5.ComponentResources;
 import org.apache.tapestry5.PropertyOverrides;
 import org.apache.tapestry5.beaneditor.BeanModel;
 import org.apache.tapestry5.integration.app1.data.RegistrationData;
 import org.apache.tapestry5.internal.BeanValidationContext;
+import org.apache.tapestry5.internal.BeanValidationContextImpl;
 import org.apache.tapestry5.ioc.Location;
 import org.apache.tapestry5.ioc.Messages;
 import org.apache.tapestry5.ioc.internal.util.TapestryException;
@@ -160,8 +163,6 @@ public class BeanEditorTest extends TapestryTestCase
 
         expect(model.newInstance()).andReturn(data);
 
-        expect(env.peek(eq(BeanValidationContext.class))).andReturn(null);
-
         expect(model.getBeanType()).andReturn(RegistrationData.class);
 
         BeanEditContext ctxt = new BeanEditContext()
@@ -178,6 +179,9 @@ public class BeanEditorTest extends TapestryTestCase
         };
 
         expect(env.push(eq(BeanEditContext.class), 
contextEq())).andReturn(ctxt);
+        expect(env.push(eq(BeanValidationContext.class), 
isA(BeanValidationContext.class)))
+                .andReturn(null);
+
         replay();
 
         BeanEditor component = new BeanEditor();

Reply via email to