Search in sources :

Example 1 with TokenGenerator

use of org.sonar.server.usertoken.TokenGenerator in project sonarqube by SonarSource.

the class UserTokensWsTest method setUp.

@Before
public void setUp() {
    UserSession userSession = mock(UserSession.class);
    DbClient dbClient = mock(DbClient.class);
    System2 system = mock(System2.class);
    TokenGenerator tokenGenerator = mock(TokenGenerator.class);
    ws = new WsTester(new UserTokensWs(new GenerateAction(dbClient, userSession, system, tokenGenerator), new RevokeAction(dbClient, userSession), new SearchAction(dbClient, userSession)));
}
Also used : TokenGenerator(org.sonar.server.usertoken.TokenGenerator) DbClient(org.sonar.db.DbClient) WsTester(org.sonar.server.ws.WsTester) UserSession(org.sonar.server.user.UserSession) System2(org.sonar.api.utils.System2) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 System2 (org.sonar.api.utils.System2)1 DbClient (org.sonar.db.DbClient)1 UserSession (org.sonar.server.user.UserSession)1 TokenGenerator (org.sonar.server.usertoken.TokenGenerator)1 WsTester (org.sonar.server.ws.WsTester)1