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 2023/02/02 15:40:39 UTC

[myfaces] branch main updated: MYFACES-4533 fixed tests

This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
     new b0f1df52f MYFACES-4533 fixed tests
b0f1df52f is described below

commit b0f1df52f819c5454d69b9500acca1929b3a3e21
Author: Thomas Andraschko <ta...@apache.org>
AuthorDate: Thu Feb 2 16:40:31 2023 +0100

    MYFACES-4533 fixed tests
---
 .../main/java/org/apache/myfaces/test/mock/MockApplication10.java   | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/test/src/main/java/org/apache/myfaces/test/mock/MockApplication10.java b/test/src/main/java/org/apache/myfaces/test/mock/MockApplication10.java
index 179658ab7..b16ccb28d 100644
--- a/test/src/main/java/org/apache/myfaces/test/mock/MockApplication10.java
+++ b/test/src/main/java/org/apache/myfaces/test/mock/MockApplication10.java
@@ -32,6 +32,7 @@ import jakarta.faces.application.NavigationHandler;
 import jakarta.faces.application.StateManager;
 import jakarta.faces.application.ViewHandler;
 import jakarta.faces.component.UIComponent;
+import jakarta.faces.component.UIViewRoot;
 import jakarta.faces.convert.Converter;
 import jakarta.faces.event.ActionListener;
 import jakarta.faces.render.RenderKitFactory;
@@ -271,6 +272,11 @@ public abstract class MockApplication10 extends Application
             throw new NullPointerException("Requested component type is null");
         }
         String componentClass = (String) components.get(componentType);
+        if (componentClass == null && "jakarta.faces.ViewRoot".equals(componentType))
+        {
+            componentClass = UIViewRoot.class.getName();
+        }
+
         if (componentClass == null)
         {
             throw new FacesException(