use of org.nhindirect.config.store.dao.SettingDao in project nhin-d by DirectProject.
the class SettingServiceTest method testAddSetting.
/**
* Test the addAnchors method.
*/
public void testAddSetting() {
final SettingDao settingDao = context.mock(SettingDao.class);
final String name = UUID.randomUUID().toString();
final String value = UUID.randomUUID().toString();
context.checking(new Expectations() {
{
oneOf(settingDao).add(name, value);
}
});
SettingServiceImpl service = new SettingServiceImpl();
service.setDao(settingDao);
try {
service.addSetting(name, value);
} catch (Exception e) {
fail("Exception thrown");
}
}
use of org.nhindirect.config.store.dao.SettingDao in project nhin-d by DirectProject.
the class SettingServiceTest method testUpdateSetting.
/**
* Test the addAnchors method.
*/
public void testUpdateSetting() {
final SettingDao settingDao = context.mock(SettingDao.class);
final String name = UUID.randomUUID().toString();
final String value = UUID.randomUUID().toString();
context.checking(new Expectations() {
{
oneOf(settingDao).update(name, value);
}
});
SettingServiceImpl service = new SettingServiceImpl();
service.setDao(settingDao);
try {
service.updateSetting(name, value);
} catch (Exception e) {
fail("Exception thrown");
}
}
use of org.nhindirect.config.store.dao.SettingDao in project nhin-d by DirectProject.
the class SettingServiceTest method testAllSettings.
/**
* Test the addAnchors method.
*/
public void testAllSettings() {
final SettingDao settingDao = context.mock(SettingDao.class);
context.checking(new Expectations() {
{
oneOf(settingDao).getAll();
}
});
SettingServiceImpl service = new SettingServiceImpl();
service.setDao(settingDao);
try {
service.getAllSettings();
} catch (Exception e) {
fail("Exception thrown");
}
}
Aggregations