Class ConfigurableFacesTest


  • public class ConfigurableFacesTest
    extends Object
    Base class for configuring the FacesContext provided by MyFaces-Test. The configuration is implemented using some kind of decorator pattern (roughly). The actual configuration relies on two sources:

    The corresponding objects ComponentConfigurator, BeanConfigDecorator, RequestConfigDecorator and ApplicationConfigurator can be accessed by the getter-methods, in case you need to configure elements for a certain test only.

    In addition there is a new way of dealing with localized messages for unit-tests. In essence there is the IdentityResourceBundle configured: This is helpful for tests where you want to ensure that a certain message key is used to create a message but do not want to test the actual ResourceBundle mechanism itself. It will always return the given key itself. As default this mechanism is active, you can change this by overwriting #isUseIdentityResouceBundle(). If it is active it is used as well for resolving the MessageBundle

    Author:
    Oliver Wolff