Author: hlship
Date: Fri Apr  1 02:17:56 2011
New Revision: 1087556

URL: http://svn.apache.org/viewvc?rev=1087556&view=rev
Log:
TAP5-35: During an Ajax update, using a "var:" binding prefix causes an 
exception indicating that the page is not rendering

Modified:
    
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/structure/InternalComponentResourcesImplTest.java

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/structure/InternalComponentResourcesImplTest.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/structure/InternalComponentResourcesImplTest.java?rev=1087556&r1=1087555&r2=1087556&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/structure/InternalComponentResourcesImplTest.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/structure/InternalComponentResourcesImplTest.java
 Fri Apr  1 02:17:56 2011
@@ -167,16 +167,12 @@ public class InternalComponentResourcesI
         Component component = mockComponent();
         Instantiator ins = mockInstantiator(component);
         ComponentModel model = mockComponentModel();
-        ComponentPageElement element = mockComponentPageElement();
 
         train_getModel(ins, model);
 
-        train_isRendering(element, true);
-        train_isRendering(element, true);
-
         replay();
 
-        ComponentResources resources = new 
InternalComponentResourcesImpl(null, element, null, elementResources,
+        ComponentResources resources = new 
InternalComponentResourcesImpl(null, null, null, elementResources,
                 "Foo.bar", null, ins, false);
 
         resources.storeRenderVariable("fred", "FRED");
@@ -203,17 +199,13 @@ public class InternalComponentResourcesI
         Component component = mockComponent();
         Instantiator ins = mockInstantiator(component);
         ComponentModel model = mockComponentModel();
-        ComponentPageElement element = mockComponentPageElement();
 
         train_getModel(ins, model);
 
-        train_isRendering(element, true);
-        train_isRendering(element, true);
-
         replay();
 
-        InternalComponentResources resources = new 
InternalComponentResourcesImpl(null, element, null,
-                elementResources, "Foo.bar", null, ins, false);
+        InternalComponentResources resources = new 
InternalComponentResourcesImpl(null, null, null, elementResources,
+                "Foo.bar", null, ins, false);
 
         resources.storeRenderVariable("fred", "FRED");
         resources.storeRenderVariable("barney", "BARNEY");
@@ -235,37 +227,6 @@ public class InternalComponentResourcesI
     }
 
     @Test
-    public void store_render_variable_when_not_rendering()
-    {
-        Component component = mockComponent();
-        Instantiator ins = mockInstantiator(component);
-        ComponentModel model = mockComponentModel();
-        ComponentPageElement element = mockComponentPageElement();
-
-        train_getModel(ins, model);
-
-        train_isRendering(element, false);
-
-        replay();
-
-        InternalComponentResources resources = new 
InternalComponentResourcesImpl(null, element, null, null, "Foo.bar",
-                null, ins, false);
-
-        try
-        {
-            resources.storeRenderVariable("fred", "FRED");
-            unreachable();
-        }
-        catch (IllegalStateException ex)
-        {
-            assertEquals(ex.getMessage(),
-                    "Component Foo.bar is not rendering, so render variable 
'fred' may not be updated.");
-        }
-
-        verify();
-    }
-
-    @Test
     public void add_page_lifecycle_listener()
     {
         Component component = mockComponent();


Reply via email to