use of org.projectforge.framework.configuration.Configuration in project projectforge by micromata.
the class AbstractTestBase method recreateDataBase.
/**
* Will be called once (BeforeClass). You may it call in your test to get a fresh database in your test class for your
* method.
*/
public void recreateDataBase() {
System.setProperty("user.timezone", "UTC");
TimeZone.setDefault(DateHelper.UTC);
Locale.setDefault(Locale.ENGLISH);
baseLog.info("user.timezone is: " + System.getProperty("user.timezone"));
final JdbcTemplate jdbc = new JdbcTemplate(dataSource);
try {
jdbc.execute("CHECKPOINT DEFRAG");
} catch (final org.springframework.jdbc.BadSqlGrammarException ex) {
// ignore
}
clearDatabase();
new Configuration(configurationService);
ConfigXmlTest.createTestConfiguration();
Registry.getInstance().init(applicationContext);
try {
initDb();
} catch (BeansException e) {
baseLog.error("Something in setUp go wrong: " + e.getMessage(), e);
}
return;
}
use of org.projectforge.framework.configuration.Configuration in project projectforge by micromata.
the class TeamEventDaoTest method setUp.
@BeforeEach
public void setUp() {
final String domain = "projectforge.org";
final Configuration config = Configuration.getInstance();
config.forceReload();
config.putParameterManual(ConfigurationParam.CALENDAR_DOMAIN, domain);
}
Aggregations