use of com.sun.faces.mock.MockFacesContext in project mojarra by eclipse-ee4j.
the class FacesLoggerTest method unresolvedNavigationUS.
@Test
public void unresolvedNavigationUS() {
MockFacesContext facesContext = new MockFacesContext();
facesContext.setApplication(new MockApplication());
facesContext.setELContext(EasyMock.createMock(ELContext.class));
UIViewRoot root = facesContext.getApplication().getViewHandler().createView(facesContext, null);
root.setLocale(Locale.US);
facesContext.setViewRoot(root);
final Object[] params = { "componentId1", "outcome.xhtml", "viewId.xhtml" };
Locale.setDefault(new Locale("en", "US"));
final String result = FacesLogger.RENDERKIT.interpolateMessage(facesContext, "faces.outcometarget.navigation.case.not.resolved", params);
Assert.assertEquals("JSF1090: Navigation case outcome.xhtml not resolved for component componentId1 in viewId viewId.xhtml", result);
}
Aggregations