use of org.pentaho.platform.api.usersettings.pojo.IUserSetting in project pentaho-platform by pentaho.
the class UserSettingServiceTest method testGetUserSettingOnlyGlobalExist.
@Test
public void testGetUserSettingOnlyGlobalExist() throws Exception {
final String settingName = GLOBAL_SETTING_NAME_3;
final String defaultValue = "defaultValue";
when(session.getAttribute(eq("SPRING_SECURITY_CONTEXT"))).thenReturn(1);
final IUserSetting userSetting = userSettingService.getUserSetting(settingName, defaultValue);
assertEquals(settingName, userSetting.getSettingName());
assertEquals(GLOBAL_SETTING_VALUE_3, userSetting.getSettingValue());
}
Aggregations