return map.size() == 1 && map.get(issue) != null && map.get(issue).equals(rule);
}
}
-
- @Test
- public void should_not_send_notification_on_any_change() throws Exception {
- IssueChangeContext changeContext = mock(IssueChangeContext.class);
-
- when(project.getAnalysisDate()).thenReturn(DateUtils.parseDate("2013-05-18"));
- RuleKey ruleKey = RuleKey.of("squid", "AvoidCycles");
- DefaultIssue issue = new DefaultIssue()
- .setChanged(true)
- .setSendNotifications(false)
- .setFieldChange(changeContext, "severity", "MINOR", "BLOCKER")
- .setRuleKey(ruleKey);
- when(issueCache.all()).thenReturn(Arrays.asList(issue));
- when(ruleFinder.findByKey(ruleKey)).thenReturn(null);
-
- SendIssueNotificationsPostJob job = new SendIssueNotificationsPostJob(issueCache, notifications, ruleFinder);
- job.executeOn(project, sensorContext);
-
- verify(notifications, never()).sendChanges(eq(issue), eq(changeContext), any(Rule.class), any(Component.class), any(Component.class));
- }
}
</prerequisites>
<properties>
- <sonarUpdateCenter.version>1.6.1</sonarUpdateCenter.version>
+ <sonarUpdateCenter.version>1.8</sonarUpdateCenter.version>
<sonarJava.version>1.3</sonarJava.version>
<sonarGwt.version>3.3.1</sonarGwt.version>
<h2.version>1.3.172</h2.version>
</excludes>
<searchTransitive>true</searchTransitive>
</bannedDependencies>
- </rules>
- </configuration>
- </execution>
- <execution>
- <!-- TODO Merge with execution enforce-rules as soon as we will remove exclusions for this rule - see SONAR-2938 -->
- <id>enforce-no-repositories</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
<requireNoRepositories>
- <!-- Also see SONAR-2849 -->
- <message>The rules for repo1.maven.org are that pom.xml files should not include repository
- definitions.
- </message>
+ <message>Definition of new repositories is not allowed in order to deploy to central repository.</message>
</requireNoRepositories>
</rules>
</configuration>
<connection>scm:git:git@github.com:SonarSource/sonar.git</connection>
<developerConnection>scm:git:git@github.com:SonarSource/sonar.git</developerConnection>
<url>https://github.com/SonarSource/sonar</url>
- <tag>3.7-RC1</tag>
+ <tag>HEAD</tag>
</scm>
<ciManagement>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <!-- unit tests -->
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>pmd</groupId>
<artifactId>pmd</artifactId>