Search in sources :

Example 1 with UserIndexer

use of org.sonar.server.user.index.UserIndexer in project sonarqube by SonarSource.

the class DeactivateActionTest method setUp.

@Before
public void setUp() {
    userIndexer = new UserIndexer(dbClient, esTester.client());
    index = new UserIndex(esTester.client());
    userIndexer = new UserIndexer(dbClient, esTester.client());
    ws = new WsActionTester(new DeactivateAction(dbClient, userIndexer, userSession, new UserJsonWriter(userSession), defaultOrganizationProvider));
}
Also used : UserIndex(org.sonar.server.user.index.UserIndex) UserIndexer(org.sonar.server.user.index.UserIndexer) WsActionTester(org.sonar.server.ws.WsActionTester) Before(org.junit.Before)

Example 2 with UserIndexer

use of org.sonar.server.user.index.UserIndexer in project sonarqube by SonarSource.

the class UpdateActionTest method setUp.

@Before
public void setUp() {
    dbClient.groupDao().insert(session, newGroupDto().setName("sonar-users"));
    session.commit();
    userIndexer = new UserIndexer(dbClient, esTester.client());
    tester = new WsTester(new UsersWs(new UpdateAction(new UserUpdater(mock(NewUserNotifier.class), settings, dbClient, userIndexer, system2, defaultOrganizationProvider, ORGANIZATION_CREATION_NOT_USED_FOR_UPDATE), userSessionRule, new UserJsonWriter(userSessionRule), dbClient)));
}
Also used : WsTester(org.sonar.server.ws.WsTester) NewUserNotifier(org.sonar.server.user.NewUserNotifier) UserIndexer(org.sonar.server.user.index.UserIndexer) UserUpdater(org.sonar.server.user.UserUpdater) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)2 UserIndexer (org.sonar.server.user.index.UserIndexer)2 NewUserNotifier (org.sonar.server.user.NewUserNotifier)1 UserUpdater (org.sonar.server.user.UserUpdater)1 UserIndex (org.sonar.server.user.index.UserIndex)1 WsActionTester (org.sonar.server.ws.WsActionTester)1 WsTester (org.sonar.server.ws.WsTester)1