use of org.uberfire.preferences.shared.UsernameProvider in project kie-wb-common by kiegroup.
the class WorkbenchPreferenceScopeTypesTest method setup.
@Before
public void setup() {
final SessionInfo sessionInfo = new SessionInfoMock();
final UsernameProvider usernameProvider = mock(UsernameProvider.class);
doReturn(sessionInfo.getIdentity().getIdentifier()).when(usernameProvider).get();
scopeTypes = new WorkbenchPreferenceScopeTypes(usernameProvider);
}
use of org.uberfire.preferences.shared.UsernameProvider in project kie-wb-common by kiegroup.
the class WorkbenchPreferenceScopeResolutionStrategyTest method setup.
@Before
public void setup() {
final SessionInfoMock sessionInfo = new SessionInfoMock("admin");
final UsernameProvider usernameProvider = mock(UsernameProvider.class);
doReturn(sessionInfo.getIdentity().getIdentifier()).when(usernameProvider).get();
scopeTypes = new WorkbenchPreferenceScopeTypes(usernameProvider);
scopesFactory = new PreferenceScopeFactoryImpl(scopeTypes);
defaultPreferenceScopeResolutionStrategy = new WorkbenchPreferenceScopeResolutionStrategy(scopesFactory, null, null);
}
use of org.uberfire.preferences.shared.UsernameProvider in project kie-wb-common by kiegroup.
the class WorkbenchPreferenceScopeResolutionStrategiesImplTest method setup.
@Before
public void setup() {
final SessionInfoMock sessionInfo = new SessionInfoMock("admin");
final UsernameProvider usernameProvider = mock(UsernameProvider.class);
doReturn(sessionInfo.getIdentity().getIdentifier()).when(usernameProvider).get();
scopeTypes = new WorkbenchPreferenceScopeTypes(usernameProvider);
scopesFactory = new PreferenceScopeFactoryImpl(scopeTypes);
scopeResolutionStrategies = new WorkbenchPreferenceScopeResolutionStrategiesImpl(scopesFactory);
}
Aggregations