myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tandrasc...@apache.org
Subject [myfaces] branch master updated: MYFACES-4283 more tests
Date Sun, 03 Mar 2019 20:42:45 GMT
This is an automated email from the ASF dual-hosted git repository.

tandraschko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces.git


The following commit(s) were added to refs/heads/master by this push:
     new a5a3329  MYFACES-4283 more tests
a5a3329 is described below

commit a5a33292ad6cf3906e4efa2608f0bf346d091728
Author: Thomas Andraschko <tandraschko@apache.org>
AuthorDate: Sun Mar 3 21:42:41 2019 +0100

    MYFACES-4283 more tests
---
 .../faces/component/InvokeOnComponentTest.java     | 34 +++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)

diff --git a/impl/src/test/java/javax/faces/component/InvokeOnComponentTest.java b/impl/src/test/java/javax/faces/component/InvokeOnComponentTest.java
index ef5a2f5..16d0430 100644
--- a/impl/src/test/java/javax/faces/component/InvokeOnComponentTest.java
+++ b/impl/src/test/java/javax/faces/component/InvokeOnComponentTest.java
@@ -64,6 +64,38 @@ public class InvokeOnComponentTest extends AbstractComponentTest
         form.setPrependId(true);
         facesContext.getViewRoot().getChildren().add(form);
         
+        AtomicBoolean val = new AtomicBoolean(false);
+        
+        this.facesContext.getViewRoot().invokeOnComponent(facesContext, "form", (context,
target) -> {
+            val.set(true);
+        });
+        
+        assertTrue(val.get());
+    }
+    
+    public void testInvokeOnFormPrependIdFalse() throws Exception
+    {
+        UIForm form = new UIForm();
+        form.setId("form");
+        form.setPrependId(false);
+        facesContext.getViewRoot().getChildren().add(form);
+
+        AtomicBoolean val = new AtomicBoolean(false);
+        
+        this.facesContext.getViewRoot().invokeOnComponent(facesContext, "form", (context,
target) -> {
+            val.set(true);
+        });
+        
+        assertTrue(val.get());
+    }
+    
+    public void testInvokeOnFormPrependIdChild() throws Exception
+    {
+        UIForm form = new UIForm();
+        form.setId("form");
+        form.setPrependId(true);
+        facesContext.getViewRoot().getChildren().add(form);
+        
         UIInput child1 = new UIInput();
         child1.setId("child1");
         form.getChildren().add(child1);
@@ -78,7 +110,7 @@ public class InvokeOnComponentTest extends AbstractComponentTest
         assertTrue(val.get());
     }
     
-    public void testInvokeOnFormPrependIdFalse() throws Exception
+    public void testInvokeOnFormPrependIdFalseChild() throws Exception
     {
         UIForm form = new UIForm();
         form.setId("form");


Mime
View raw message