assertTrue(config.getAllowedShowlets().contains("jpmyportalplus_sample_widget"));
assertTrue(config.getAllowedShowlets().contains("jpmyportalplus_test_widget_1"));
}
public void testUpdateConfig() throws Throwable {
MyPortalConfig config = this._myPortalConfigManager.getConfig();
assertEquals(3, config.getAllowedShowlets().size());
try {
MyPortalConfig newConfig = new MyPortalConfig();
assertNull(newConfig.getAllowedShowlets());
Set<String> allowedShowlets = new HashSet<String>();
allowedShowlets.addAll(config.getAllowedShowlets());
allowedShowlets.add("jpmyportalplus_test_widget_2");
newConfig.setAllowedShowlets(allowedShowlets);
this._myPortalConfigManager.saveConfig(newConfig);
MyPortalConfig extractedNewConfig = this._myPortalConfigManager.getConfig();
assertEquals(4, extractedNewConfig.getAllowedShowlets().size());
} catch (Exception e) {
throw e;
} finally {
this._myPortalConfigManager.saveConfig(config);
MyPortalConfig extractedConfig = this._myPortalConfigManager.getConfig();
assertEquals(3, extractedConfig.getAllowedShowlets().size());
}
}