Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
None
-
See attached JUnit test case which fails with myfaces-test20-1.0.0-SNAPSHOT
Tested with Mojarra-2.0.2
Description
Components tested inside a test case inherited from AbstractJsfTestCase are not able to do following:
ELContext elContext = facesContext.getELContext();
ValueExpression ve = application.getExpressionFactory().createValueExpression(elContext, "#
", String.class);
ve.setValue(elContext, "BAR");
The error is caused by the FacesResourceBundleELResolver inside the setValue method, where it tries to get a ResourceBundle from MockApplication12 for the given ValueExpression. Unfortunately the MockApplication12 getResourceBundle method throws a MissingResourceException instead of returning null.
Please apply attached patch to the code base.