Search in sources :

Example 1 with NewUserHandler

use of org.sonar.api.platform.NewUserHandler in project sonarqube by SonarSource.

the class NewUserNotifierTest method execute_handlers_on_new_user.

@Test
public void execute_handlers_on_new_user() {
    NewUserHandler handler1 = mock(NewUserHandler.class);
    NewUserHandler handler2 = mock(NewUserHandler.class);
    NewUserNotifier notifier = new NewUserNotifier(new NewUserHandler[] { handler1, handler2 });
    notifier.onNewUser(context);
    verify(handler1).doOnNewUser(context);
    verify(handler2).doOnNewUser(context);
}
Also used : NewUserHandler(org.sonar.api.platform.NewUserHandler) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 NewUserHandler (org.sonar.api.platform.NewUserHandler)1