use of org.entando.entando.aps.system.services.widgettype.WidgetTypeDAO in project entando-core by entando.
the class TestWidgetTypeDAO method testLoadWidgetTypes.
public void testLoadWidgetTypes() throws Throwable {
DataSource dataSource = (DataSource) this.getApplicationContext().getBean("portDataSource");
WidgetTypeDAO widgetTypeDao = new WidgetTypeDAO();
widgetTypeDao.setDataSource(dataSource);
ILangManager langManager = (ILangManager) this.getService(SystemConstants.LANGUAGE_MANAGER);
widgetTypeDao.setLangManager(langManager);
Map<String, WidgetType> types = null;
try {
types = widgetTypeDao.loadWidgetTypes();
} catch (Throwable t) {
throw t;
}
WidgetType showletType = (WidgetType) types.get("content_viewer");
assertNotNull(showletType);
showletType = (WidgetType) types.get("content_viewer_list");
assertNotNull(showletType);
}
Aggregations