tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kao...@apache.org
Subject git commit: RESOLVED - TAP5-2101: BeanEditor should always provide a new BeanValidationContext (JSR-303) - fix failing test
Date Tue, 16 Apr 2013 06:55:42 GMT
Updated Branches:
  refs/heads/master 18b6f2be1 -> cc0c541ab


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/cc0c541a
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/cc0c541a
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/cc0c541a

Branch: refs/heads/master
Commit: cc0c541ab87970bf31be04c177c016fe16274628
Parents: 18b6f2b
Author: kaosko <kaosko@apache.org>
Authored: Mon Apr 15 23:55:36 2013 -0700
Committer: kaosko <kaosko@apache.org>
Committed: Mon Apr 15 23:55:36 2013 -0700

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


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/cc0c541a/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 2cfd46d..745d6c3 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
@@ -154,6 +154,7 @@ public class BeanEditorTest extends TapestryTestCase
         RegistrationData data = new RegistrationData();
         Messages messages = mockMessages();
         PropertyOverrides overrides = mockPropertyOverrides();
+        BeanValidationContext beanValidationContext = newMock(BeanValidationContext.class);
 
         train_getBoundType(resources, "object", RegistrationData.class);
 
@@ -180,7 +181,7 @@ 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);
+                .andReturn(beanValidationContext);
 
         replay();
 
@@ -213,10 +214,6 @@ public class BeanEditorTest extends TapestryTestCase
 
         expect(model.newInstance()).andReturn(data);
 
-        expect(env.peek(eq(BeanValidationContext.class))).andReturn(beanValidationContext);
-
-        expect(env.pop(eq(BeanValidationContext.class))).andReturn(beanValidationContext);
-
         expect(env.push(eq(BeanValidationContext.class), isA(BeanValidationContext.class))).andReturn(beanValidationContext);
 
         expect(model.getBeanType()).andReturn(RegistrationData.class);


Mime
View raw message