You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sv...@apache.org on 2005/11/02 02:06:03 UTC

svn commit: r330168 - in /myfaces/impl/trunk/src/test/org/apache/myfaces/el: TestBean.java ValueBindingImplCactus.java

Author: svieujot
Date: Tue Nov  1 17:05:59 2005
New Revision: 330168

URL: http://svn.apache.org/viewcvs?rev=330168&view=rev
Log:
Add Test for MYFACES-736.

Modified:
    myfaces/impl/trunk/src/test/org/apache/myfaces/el/TestBean.java
    myfaces/impl/trunk/src/test/org/apache/myfaces/el/ValueBindingImplCactus.java

Modified: myfaces/impl/trunk/src/test/org/apache/myfaces/el/TestBean.java
URL: http://svn.apache.org/viewcvs/myfaces/impl/trunk/src/test/org/apache/myfaces/el/TestBean.java?rev=330168&r1=330167&r2=330168&view=diff
==============================================================================
--- myfaces/impl/trunk/src/test/org/apache/myfaces/el/TestBean.java (original)
+++ myfaces/impl/trunk/src/test/org/apache/myfaces/el/TestBean.java Tue Nov  1 17:05:59 2005
@@ -4,6 +4,8 @@
 
 public class TestBean {
 	private Map map;
+	
+	private int integerPrimitive = 0;
 
 	public TestBean(Map map) {
 		this.map = map;
@@ -15,5 +17,12 @@
 
 	public void setMap(Map map) {
 		this.map = map;
+	}
+	
+	public int getIntegerPrimitive(){
+		return integerPrimitive;
+	}
+	public void setIntegerPrimitive(int integerPrimitive){
+		this.integerPrimitive = integerPrimitive;
 	}
 }

Modified: myfaces/impl/trunk/src/test/org/apache/myfaces/el/ValueBindingImplCactus.java
URL: http://svn.apache.org/viewcvs/myfaces/impl/trunk/src/test/org/apache/myfaces/el/ValueBindingImplCactus.java?rev=330168&r1=330167&r2=330168&view=diff
==============================================================================
--- myfaces/impl/trunk/src/test/org/apache/myfaces/el/ValueBindingImplCactus.java (original)
+++ myfaces/impl/trunk/src/test/org/apache/myfaces/el/ValueBindingImplCactus.java Tue Nov  1 17:05:59 2005
@@ -126,6 +126,15 @@
 		binding.setValue(facesContext, value);
 		assertEquals(14, ((Integer)binding.getValue(facesContext)).intValue());
 	}
+	
+	public void setSetIntegerPrimitive() {
+		TestBean bean = new TestBean(new HashMap());
+		facesContext.getExternalContext().getSessionMap().put("bean", bean);
+		ValueBinding binding = application.createValueBinding("#{bean.integerPrimitive}");
+		Integer value = new Integer(14);
+		binding.setValue(facesContext, value);
+		assertEquals(14, bean.getIntegerPrimitive());
+	}
 
 	/*
 	 * Test method for