Page History
...
- FactoryUtil - Class to allow various kinds of classes instantiations. Includes methods to convert content to beans.
Code Block |
---|
final SystemContext sysCtx = createStrictMock(SystemContext.class);
sysCtx.setLocale(Locale.ENGLISH);
FactoryUtil.setInstance(SystemContext.class, sysCtx);
|
What this example does is to create a strict mock of the SystemContext Class that is it creates a mock object that implements this interface with order checking. It sets the property Locale to this new context and then uses the FactoryUtil class
Overview
Content Tools