use of com.haulmont.cuba.core.sys.BeanLocatorImpl in project cuba by cuba-platform.
the class XmlInheritanceTest method setUp.
@BeforeEach
public void setUp() {
addEntityPackage("com.haulmont.cuba");
setupInfrastructure();
resources = new ResourcesImpl(getClass().getClassLoader());
screenXmlParser = new ScreenXmlParser() {
{
dom4JTools = new Dom4jTools(AppBeans.get(GlobalConfig.class), new Dom4jToolsConfig() {
@Override
public int getMaxPoolSize() {
return 10;
}
@Override
public long getMaxBorrowWaitMillis() {
return 10000;
}
});
}
};
beanLocator = new BeanLocatorImpl() {
@Override
public <T> T getPrototype(String name, Object... args) {
if (XmlInheritanceProcessor.NAME.equals(name)) {
XmlInheritanceProcessor processor = new XmlInheritanceProcessor((Document) args[0], (Map) args[1]) {
{
resources = XmlInheritanceTest.this.resources;
screenXmlParser = XmlInheritanceTest.this.screenXmlParser;
beanLocator = XmlInheritanceTest.this.beanLocator;
}
};
return (T) processor;
}
return super.getPrototype(name, args);
}
};
}
Aggregations