You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2011/10/21 17:56:42 UTC

svn commit: r1187421 - /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImplTest.java

Author: hlship
Date: Fri Oct 21 15:56:41 2011
New Revision: 1187421

URL: http://svn.apache.org/viewvc?rev=1187421&view=rev
Log:
TAP5-1713: Create failing test case for bug

Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImplTest.java

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImplTest.java?rev=1187421&r1=1187420&r2=1187421&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImplTest.java Fri Oct 21 15:56:41 2011
@@ -870,4 +870,16 @@ public class PropertyConduitSourceImplTe
                     "Expression 'read_only' for class org.apache.tapestry5.internal.services.PublicStaticFieldBean is read-only.");
         }
     }
+
+    @Test
+    public void public_static_field_in_an_array()
+    {
+        PropertyConduit pc = source.create(PublicStaticFieldBean.class, "[read_only]");
+
+        // Need to instantiate it, or exception "Root object of property expression is null"
+
+        List<String> actual = (List<String>) pc.get(new PublicStaticFieldBean());
+
+        assertListsEquals(actual, PublicStaticFieldBean.READ_ONLY);
+    }
 }