You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ta...@apache.org on 2019/03/03 20:42:45 UTC
[myfaces] branch master updated: MYFACES-4283 more tests
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 <ta...@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");