Search in sources :

Example 11 with Project

use of org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Project in project sonarqube by SonarSource.

the class FPOrWontFixNotificationTest method hashcode_is_based_on_issues_change_and_resolution.

@Test
public void hashcode_is_based_on_issues_change_and_resolution() {
    Rule rule = newRandomNotAHotspotRule("rule_name");
    Project project = new Project.Builder("prj_uuid").setKey("prj_key").setProjectName("prj_name").build();
    Set<ChangedIssue> changedIssues = IntStream.range(0, 2 + new Random().nextInt(5)).mapToObj(i -> new ChangedIssue.Builder("key_" + i).setNewStatus("status").setRule(rule).setProject(project).build()).collect(Collectors.toSet());
    AnalysisChange change = new AnalysisChange(12);
    User user = new User("uuid", "login", null);
    FPOrWontFixNotification underTest = new FPOrWontFixNotification(change, changedIssues, WONT_FIX);
    assertThat(underTest.hashCode()).isEqualTo(new FPOrWontFixNotification(change, changedIssues, WONT_FIX).hashCode()).isEqualTo(new FPOrWontFixNotification(change, ImmutableSet.copyOf(changedIssues), WONT_FIX).hashCode()).isNotEqualTo(new Object().hashCode()).isNotEqualTo(new FPOrWontFixNotification(change, Collections.emptySet(), WONT_FIX).hashCode()).isNotEqualTo(new FPOrWontFixNotification(change, ImmutableSet.of(changedIssues.iterator().next()), WONT_FIX).hashCode()).isNotEqualTo(new FPOrWontFixNotification(new AnalysisChange(14), changedIssues, WONT_FIX).hashCode()).isNotEqualTo(new FPOrWontFixNotification(new IssuesChangesNotificationBuilder.UserChange(12, user), changedIssues, WONT_FIX).hashCode()).isNotEqualTo(new FPOrWontFixNotification(change, changedIssues, FP)).hashCode();
}
Also used : IntStream(java.util.stream.IntStream) User(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.User) ImmutableSet(com.google.common.collect.ImmutableSet) Project(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Project) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) Set(java.util.Set) Random(java.util.Random) Test(org.junit.Test) Collectors(java.util.stream.Collectors) IssuesChangesNotificationBuilderTesting.newRandomNotAHotspotRule(org.sonar.server.issue.notification.IssuesChangesNotificationBuilderTesting.newRandomNotAHotspotRule) Rule(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Rule) WONT_FIX(org.sonar.server.issue.notification.FPOrWontFixNotification.FpOrWontFix.WONT_FIX) ChangedIssue(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.ChangedIssue) FP(org.sonar.server.issue.notification.FPOrWontFixNotification.FpOrWontFix.FP) AnalysisChange(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.AnalysisChange) Collections(java.util.Collections) User(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.User) AnalysisChange(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.AnalysisChange) Project(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Project) Random(java.util.Random) ChangedIssue(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.ChangedIssue) IssuesChangesNotificationBuilderTesting.newRandomNotAHotspotRule(org.sonar.server.issue.notification.IssuesChangesNotificationBuilderTesting.newRandomNotAHotspotRule) Rule(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Rule) Test(org.junit.Test)

Example 12 with Project

use of org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Project in project sonarqube by SonarSource.

the class IssuesChangesNotificationBuilderTest method Project_toString.

@Test
public void Project_toString() {
    Project project = new Project.Builder("uuid").setKey("key").setProjectName("name").setBranchName("branch-name").build();
    assertThat(project).hasToString("Project{uuid='uuid', key='key', projectName='name', branchName='branch-name'}");
}
Also used : Project(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Project) Test(org.junit.Test)

Example 13 with Project

use of org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Project in project sonarqube by SonarSource.

the class FPOrWontFixNotificationHandlerTest method deliver_does_not_send_email_request_for_notifications_a_subscriber_is_the_changeAuthor_of.

@Test
@UseDataProvider("FPorWontFixResolution")
public void deliver_does_not_send_email_request_for_notifications_a_subscriber_is_the_changeAuthor_of(String newResolution) {
    Project project = newProject(randomAlphabetic(5));
    User subscriber1 = newUser("subscriber1");
    User subscriber2 = newUser("subscriber2");
    User subscriber3 = newUser("subscriber3");
    User otherChangeAuthor = newUser("otherChangeAuthor");
    // subscriber1 is the changeAuthor of some notifications with issues assigned to subscriber1 only
    Set<IssuesChangesNotificationBuilder> subscriber1Notifications = IntStream.range(0, 1 + new Random().nextInt(2)).mapToObj(j -> new IssuesChangesNotificationBuilder(randomIssues(t -> t.setProject(project).setNewResolution(newResolution).setAssignee(subscriber2)).collect(toSet()), newUserChange(subscriber1))).collect(toSet());
    // subscriber1 is the changeAuthor of some notifications with issues assigned to subscriber1 and subscriber2
    Set<IssuesChangesNotificationBuilder> subscriber1and2Notifications = IntStream.range(0, 1 + new Random().nextInt(2)).mapToObj(j -> new IssuesChangesNotificationBuilder(Stream.concat(randomIssues(t -> t.setProject(project).setNewResolution(newResolution).setAssignee(subscriber2)), randomIssues(t -> t.setProject(project).setNewResolution(newResolution).setAssignee(subscriber1))).collect(toSet()), newUserChange(subscriber1))).collect(toSet());
    // subscriber2 is the changeAuthor of some notifications with issues assigned to subscriber2 only
    Set<IssuesChangesNotificationBuilder> subscriber2Notifications = IntStream.range(0, 1 + new Random().nextInt(2)).mapToObj(j -> new IssuesChangesNotificationBuilder(randomIssues(t -> t.setProject(project).setNewResolution(newResolution).setAssignee(subscriber2)).collect(toSet()), newUserChange(subscriber2))).collect(toSet());
    // subscriber2 is the changeAuthor of some notifications with issues assigned to subscriber2 and subscriber 3
    Set<IssuesChangesNotificationBuilder> subscriber2And3Notifications = IntStream.range(0, 1 + new Random().nextInt(2)).mapToObj(j -> new IssuesChangesNotificationBuilder(Stream.concat(randomIssues(t -> t.setProject(project).setNewResolution(newResolution).setAssignee(subscriber2)), randomIssues(t -> t.setProject(project).setNewResolution(newResolution).setAssignee(subscriber3))).collect(toSet()), newUserChange(subscriber2))).collect(toSet());
    // subscriber3 is the changeAuthor of no notification
    // otherChangeAuthor has some notifications
    Set<IssuesChangesNotificationBuilder> otherChangeAuthorNotifications = IntStream.range(0, 1 + new Random().nextInt(2)).mapToObj(j -> new IssuesChangesNotificationBuilder(randomIssues(t -> t.setProject(project).setNewResolution(newResolution)).collect(toSet()), newUserChange(otherChangeAuthor))).collect(toSet());
    when(emailNotificationChannel.isActivated()).thenReturn(true);
    Set<String> subscriberLogins = ImmutableSet.of(subscriber1.getLogin(), subscriber2.getLogin(), subscriber3.getLogin());
    when(notificationManager.findSubscribedEmailRecipients(DO_NOT_FIX_ISSUE_CHANGE_DISPATCHER_KEY, project.getKey(), ALL_MUST_HAVE_ROLE_USER)).thenReturn(subscriberLogins.stream().map(FPOrWontFixNotificationHandlerTest::emailRecipientOf).collect(toSet()));
    int deliveredCount = new Random().nextInt(200);
    when(emailNotificationChannel.deliverAll(anySet())).thenReturn(deliveredCount).thenThrow(new IllegalStateException("deliver should be called only once"));
    Set<IssuesChangesNotification> notifications = Stream.of(subscriber1Notifications.stream(), subscriber1and2Notifications.stream(), subscriber2Notifications.stream(), subscriber2And3Notifications.stream(), otherChangeAuthorNotifications.stream()).flatMap(t -> t).map(serializer::serialize).collect(toSet());
    reset(serializer);
    int deliver = underTest.deliver(notifications);
    assertThat(deliver).isEqualTo(deliveredCount);
    verify(notificationManager).findSubscribedEmailRecipients(DO_NOT_FIX_ISSUE_CHANGE_DISPATCHER_KEY, project.getKey(), ALL_MUST_HAVE_ROLE_USER);
    verifyNoMoreInteractions(notificationManager);
    verify(emailNotificationChannel).isActivated();
    ArgumentCaptor<Set<EmailDeliveryRequest>> captor = ArgumentCaptor.forClass(requestSetType);
    verify(emailNotificationChannel).deliverAll(captor.capture());
    verifyNoMoreInteractions(emailNotificationChannel);
    ListMultimap<String, EmailDeliveryRequest> requestsByRecipientEmail = captor.getValue().stream().collect(index(EmailDeliveryRequest::getRecipientEmail));
    assertThat(requestsByRecipientEmail.get(emailOf(subscriber1.getLogin()))).containsOnly(Stream.of(subscriber2Notifications.stream().map(notif -> newEmailDeliveryRequest(notif, subscriber1, toFpOrWontFix(newResolution))), subscriber2And3Notifications.stream().map(notif -> newEmailDeliveryRequest(notif, subscriber1, toFpOrWontFix(newResolution))), otherChangeAuthorNotifications.stream().map(notif -> newEmailDeliveryRequest(notif, subscriber1, toFpOrWontFix(newResolution)))).flatMap(t -> t).toArray(EmailDeliveryRequest[]::new));
    assertThat(requestsByRecipientEmail.get(emailOf(subscriber2.getLogin()))).containsOnly(Stream.of(subscriber1Notifications.stream().map(notif -> newEmailDeliveryRequest(notif, subscriber2, toFpOrWontFix(newResolution))), subscriber1and2Notifications.stream().map(notif -> newEmailDeliveryRequest(notif, subscriber2, toFpOrWontFix(newResolution))), otherChangeAuthorNotifications.stream().map(notif -> newEmailDeliveryRequest(notif, subscriber2, toFpOrWontFix(newResolution)))).flatMap(t -> t).toArray(EmailDeliveryRequest[]::new));
    assertThat(requestsByRecipientEmail.get(emailOf(subscriber3.getLogin()))).containsOnly(Stream.of(subscriber1Notifications.stream().map(notif -> newEmailDeliveryRequest(notif, subscriber3, toFpOrWontFix(newResolution))), subscriber1and2Notifications.stream().map(notif -> newEmailDeliveryRequest(notif, subscriber3, toFpOrWontFix(newResolution))), subscriber2Notifications.stream().map(notif -> newEmailDeliveryRequest(notif, subscriber3, toFpOrWontFix(newResolution))), subscriber2And3Notifications.stream().map(notif -> newEmailDeliveryRequest(notif, subscriber3, toFpOrWontFix(newResolution))), otherChangeAuthorNotifications.stream().map(notif -> newEmailDeliveryRequest(notif, subscriber3, toFpOrWontFix(newResolution)))).flatMap(t -> t).toArray(EmailDeliveryRequest[]::new));
    assertThat(requestsByRecipientEmail.get(emailOf(otherChangeAuthor.getLogin()))).isEmpty();
}
Also used : IntStream(java.util.stream.IntStream) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) ArgumentMatchers.anySet(org.mockito.ArgumentMatchers.anySet) ALL_MUST_HAVE_ROLE_USER(org.sonar.server.notification.NotificationManager.SubscriberPermissionsOnProject.ALL_MUST_HAVE_ROLE_USER) ListMultimap(com.google.common.collect.ListMultimap) RESOLUTION_WONT_FIX(org.sonar.api.issue.Issue.RESOLUTION_WONT_FIX) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) RunWith(org.junit.runner.RunWith) Random(java.util.Random) Mockito.spy(org.mockito.Mockito.spy) DataProvider(com.tngtech.java.junit.dataprovider.DataProvider) DataProviderRunner(com.tngtech.java.junit.dataprovider.DataProviderRunner) Mockito.verifyZeroInteractions(org.mockito.Mockito.verifyZeroInteractions) FpOrWontFix(org.sonar.server.issue.notification.FPOrWontFixNotification.FpOrWontFix) ArgumentCaptor(org.mockito.ArgumentCaptor) EmailDeliveryRequest(org.sonar.server.notification.email.EmailNotificationChannel.EmailDeliveryRequest) MoreCollectors.index(org.sonar.core.util.stream.MoreCollectors.index) Collections.singleton(java.util.Collections.singleton) Mockito.verifyNoMoreInteractions(org.mockito.Mockito.verifyNoMoreInteractions) RESOLUTION_FALSE_POSITIVE(org.sonar.api.issue.Issue.RESOLUTION_FALSE_POSITIVE) ChangedIssue(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.ChangedIssue) Assert.fail(org.junit.Assert.fail) NotificationManager(org.sonar.server.notification.NotificationManager) IssuesChangesNotificationBuilderTesting.newProject(org.sonar.server.issue.notification.IssuesChangesNotificationBuilderTesting.newProject) Collectors.toSet(java.util.stream.Collectors.toSet) User(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.User) ImmutableSet(com.google.common.collect.ImmutableSet) Project(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Project) RandomStringUtils.randomAlphabetic(org.apache.commons.lang.RandomStringUtils.randomAlphabetic) UseDataProvider(com.tngtech.java.junit.dataprovider.UseDataProvider) Set(java.util.Set) Test(org.junit.Test) Mockito.times(org.mockito.Mockito.times) Mockito.when(org.mockito.Mockito.when) UserChange(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.UserChange) PER_PROJECT_NOTIFICATION(org.sonar.server.notification.NotificationDispatcherMetadata.PER_PROJECT_NOTIFICATION) Mockito.verify(org.mockito.Mockito.verify) Consumer(java.util.function.Consumer) IssuesChangesNotificationBuilderTesting.newRandomNotAHotspotRule(org.sonar.server.issue.notification.IssuesChangesNotificationBuilderTesting.newRandomNotAHotspotRule) Mockito(org.mockito.Mockito) Stream(java.util.stream.Stream) Issue(org.sonar.api.issue.Issue) GLOBAL_NOTIFICATION(org.sonar.server.notification.NotificationDispatcherMetadata.GLOBAL_NOTIFICATION) Change(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Change) NotificationDispatcherMetadata(org.sonar.server.notification.NotificationDispatcherMetadata) EmailNotificationChannel(org.sonar.server.notification.email.EmailNotificationChannel) Mockito.reset(org.mockito.Mockito.reset) Mockito.mock(org.mockito.Mockito.mock) User(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.User) ArgumentMatchers.anySet(org.mockito.ArgumentMatchers.anySet) Collectors.toSet(java.util.stream.Collectors.toSet) ImmutableSet(com.google.common.collect.ImmutableSet) Set(java.util.Set) IssuesChangesNotificationBuilderTesting.newProject(org.sonar.server.issue.notification.IssuesChangesNotificationBuilderTesting.newProject) Project(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Project) Random(java.util.Random) EmailDeliveryRequest(org.sonar.server.notification.email.EmailNotificationChannel.EmailDeliveryRequest) Test(org.junit.Test) UseDataProvider(com.tngtech.java.junit.dataprovider.UseDataProvider)

Example 14 with Project

use of org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Project in project sonarqube by SonarSource.

the class FpOrWontFixEmailTemplateTest method formats_returns_html_message_for_multiple_hotspots_of_same_rule_on_same_project_on_branch.

@Test
@UseDataProvider("fpOrWontFixValuesByUserOrAnalysisChange")
public void formats_returns_html_message_for_multiple_hotspots_of_same_rule_on_same_project_on_branch(Change change, FpOrWontFix fpOrWontFix) {
    String branchName = randomAlphabetic(19);
    Project project = newBranch("1", branchName);
    String ruleName = randomAlphabetic(8);
    String host = randomAlphabetic(15);
    Rule rule = newSecurityHotspotRule(ruleName);
    List<ChangedIssue> changedIssues = IntStream.range(0, 2 + new Random().nextInt(5)).mapToObj(i -> newChangedIssue("issue_" + i, project, rule)).collect(toList());
    when(emailSettings.getServerBaseURL()).thenReturn(host);
    EmailMessage emailMessage = underTest.format(new FPOrWontFixNotification(change, ImmutableSet.copyOf(changedIssues), fpOrWontFix));
    String expectedHref = host + "/project/issues?id=" + project.getKey() + "&branch=" + branchName + "&issues=" + changedIssues.stream().map(ChangedIssue::getKey).collect(joining("%2C"));
    String expectedLinkText = "See all " + changedIssues.size() + " hotspots";
    HtmlFragmentAssert.assertThat(emailMessage.getMessage()).hasParagraph().hasParagraph().hasParagraph(project.getProjectName() + ", " + branchName).hasList("Rule " + ruleName + " - " + expectedLinkText).withLink(expectedLinkText, expectedHref).hasParagraph().hasParagraph().noMoreBlock();
}
Also used : IntStream(java.util.stream.IntStream) HtmlFragmentAssert(org.sonar.test.html.HtmlFragmentAssert) I18n(org.sonar.core.i18n.I18n) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) RunWith(org.junit.runner.RunWith) Random(java.util.Random) DataProvider(com.tngtech.java.junit.dataprovider.DataProvider) DataProviderRunner(com.tngtech.java.junit.dataprovider.DataProviderRunner) IssuesChangesNotificationBuilderTesting.newSecurityHotspotRule(org.sonar.server.issue.notification.IssuesChangesNotificationBuilderTesting.newSecurityHotspotRule) RuleType(org.sonar.api.rules.RuleType) FpOrWontFix(org.sonar.server.issue.notification.FPOrWontFixNotification.FpOrWontFix) EmailSettings(org.sonar.api.config.EmailSettings) Locale(java.util.Locale) ChangedIssue(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.ChangedIssue) SECURITY_HOTSPOT(org.sonar.api.rules.RuleType.SECURITY_HOTSPOT) AnalysisChange(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.AnalysisChange) User(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.User) ImmutableSet(com.google.common.collect.ImmutableSet) Project(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Project) RandomStringUtils.randomAlphabetic(org.apache.commons.lang.RandomStringUtils.randomAlphabetic) Notification(org.sonar.api.notifications.Notification) UseDataProvider(com.tngtech.java.junit.dataprovider.UseDataProvider) Test(org.junit.Test) Mockito.when(org.mockito.Mockito.when) UserChange(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.UserChange) Collectors.joining(java.util.stream.Collectors.joining) IssuesChangesNotificationBuilderTesting.newRandomNotAHotspotRule(org.sonar.server.issue.notification.IssuesChangesNotificationBuilderTesting.newRandomNotAHotspotRule) Rule(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Rule) List(java.util.List) Collectors.toList(java.util.stream.Collectors.toList) WONT_FIX(org.sonar.server.issue.notification.FPOrWontFixNotification.FpOrWontFix.WONT_FIX) Stream(java.util.stream.Stream) RuleKey(org.sonar.api.rule.RuleKey) Change(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Change) IssuesChangesNotificationBuilderTesting.randomRuleTypeHotspotExcluded(org.sonar.server.issue.notification.IssuesChangesNotificationBuilderTesting.randomRuleTypeHotspotExcluded) FP(org.sonar.server.issue.notification.FPOrWontFixNotification.FpOrWontFix.FP) Collections(java.util.Collections) Mockito.mock(org.mockito.Mockito.mock) Project(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Project) Random(java.util.Random) ChangedIssue(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.ChangedIssue) IssuesChangesNotificationBuilderTesting.newSecurityHotspotRule(org.sonar.server.issue.notification.IssuesChangesNotificationBuilderTesting.newSecurityHotspotRule) IssuesChangesNotificationBuilderTesting.newRandomNotAHotspotRule(org.sonar.server.issue.notification.IssuesChangesNotificationBuilderTesting.newRandomNotAHotspotRule) Rule(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Rule) Test(org.junit.Test) UseDataProvider(com.tngtech.java.junit.dataprovider.UseDataProvider)

Example 15 with Project

use of org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Project in project sonarqube by SonarSource.

the class FpOrWontFixEmailTemplateTest method formats_returns_html_message_for_single_hotspot_on_branch.

@Test
@UseDataProvider("fpOrWontFixValuesByUserOrAnalysisChange")
public void formats_returns_html_message_for_single_hotspot_on_branch(Change change, FpOrWontFix fpOrWontFix) {
    String branchName = randomAlphabetic(6);
    Project project = newBranch("1", branchName);
    String ruleName = randomAlphabetic(8);
    String host = randomAlphabetic(15);
    String key = "key";
    ChangedIssue changedIssue = newChangedIssue(key, project, ruleName, SECURITY_HOTSPOT);
    when(emailSettings.getServerBaseURL()).thenReturn(host);
    EmailMessage emailMessage = underTest.format(new FPOrWontFixNotification(change, ImmutableSet.of(changedIssue), fpOrWontFix));
    HtmlFragmentAssert.assertThat(emailMessage.getMessage()).hasParagraph().hasParagraph().hasParagraph(project.getProjectName() + ", " + branchName).hasList("Rule " + ruleName + " - See the single hotspot").withLink("See the single hotspot", host + "/project/issues?id=" + project.getKey() + "&branch=" + branchName + "&issues=" + changedIssue.getKey() + "&open=" + changedIssue.getKey()).hasParagraph().hasParagraph().noMoreBlock();
}
Also used : Project(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Project) ChangedIssue(org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.ChangedIssue) Test(org.junit.Test) UseDataProvider(com.tngtech.java.junit.dataprovider.UseDataProvider)

Aggregations

Project (org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Project)45 Test (org.junit.Test)43 ChangedIssue (org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.ChangedIssue)40 UseDataProvider (com.tngtech.java.junit.dataprovider.UseDataProvider)32 UserChange (org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.UserChange)30 ImmutableSet (com.google.common.collect.ImmutableSet)29 Random (java.util.Random)29 IntStream (java.util.stream.IntStream)29 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)29 IssuesChangesNotificationBuilderTesting.newRandomNotAHotspotRule (org.sonar.server.issue.notification.IssuesChangesNotificationBuilderTesting.newRandomNotAHotspotRule)29 AnalysisChange (org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.AnalysisChange)28 Rule (org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Rule)28 DataProvider (com.tngtech.java.junit.dataprovider.DataProvider)27 DataProviderRunner (com.tngtech.java.junit.dataprovider.DataProviderRunner)27 Stream (java.util.stream.Stream)27 RandomStringUtils.randomAlphabetic (org.apache.commons.lang.RandomStringUtils.randomAlphabetic)27 RunWith (org.junit.runner.RunWith)27 Mockito.mock (org.mockito.Mockito.mock)27 Mockito.when (org.mockito.Mockito.when)27 Change (org.sonar.server.issue.notification.IssuesChangesNotificationBuilder.Change)27