aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-server-common
diff options
context:
space:
mode:
authorLéo Geoffroy <99647462+leo-geoffroy-sonarsource@users.noreply.github.com>2022-04-04 18:08:34 +0200
committersonartech <sonartech@sonarsource.com>2022-04-04 20:02:56 +0000
commit12939729652fad6fa91b72c2139da65dc07ec7e0 (patch)
tree4752663c64fe527eabe2129028a22a1f394351cb /server/sonar-server-common
parent328aa8c538d17bb2c0f201de221e7edeff5e1349 (diff)
downloadsonarqube-12939729652fad6fa91b72c2139da65dc07ec7e0.tar.gz
sonarqube-12939729652fad6fa91b72c2139da65dc07ec7e0.zip
NO-JIRA Update Mockito and simpleframework to latest major version
Diffstat (limited to 'server/sonar-server-common')
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/es/searchrequest/TopAggregationHelperTest.java4
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/ChangesOnMyIssueNotificationHandlerTest.java12
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/FPOrWontFixNotificationHandlerTest.java16
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/MyNewIssuesNotificationHandlerTest.java12
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewIssuesNotificationHandlerTest.java10
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/notification/NotificationServiceTest.java10
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/qualitygate/notification/QGChangeNotificationHandlerTest.java10
7 files changed, 37 insertions, 37 deletions
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/es/searchrequest/TopAggregationHelperTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/es/searchrequest/TopAggregationHelperTest.java
index 3df4ade37de..be531373b42 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/es/searchrequest/TopAggregationHelperTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/es/searchrequest/TopAggregationHelperTest.java
@@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.elasticsearch.index.query.QueryBuilders.boolQuery;
import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verifyZeroInteractions;
+import static org.mockito.Mockito.verifyNoInteractions;
import static org.mockito.Mockito.when;
import static org.sonar.server.es.searchrequest.TopAggregationHelper.NO_EXTRA_FILTER;
import static org.sonar.server.es.searchrequest.TopAggregationHelper.NO_OTHER_SUBAGGREGATION;
@@ -139,7 +139,7 @@ public class TopAggregationHelperTest {
underTest.buildTopAggregation(topAggregationName, topAggregation, NO_EXTRA_FILTER, t -> t.subAggregation(subAggregation));
- verifyZeroInteractions(subAggregationHelper);
+ verifyNoInteractions(subAggregationHelper);
}
@Test
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/ChangesOnMyIssueNotificationHandlerTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/ChangesOnMyIssueNotificationHandlerTest.java
index fa5eb7a58c1..83477da167d 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/ChangesOnMyIssueNotificationHandlerTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/ChangesOnMyIssueNotificationHandlerTest.java
@@ -55,8 +55,8 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.anySet;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoInteractions;
import static org.mockito.Mockito.verifyNoMoreInteractions;
-import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
import static org.sonar.core.util.stream.MoreCollectors.index;
import static org.sonar.core.util.stream.MoreCollectors.unorderedIndex;
@@ -116,7 +116,7 @@ public class ChangesOnMyIssueNotificationHandlerTest {
int deliver = underTest.deliver(Collections.emptyList());
assertThat(deliver).isZero();
- verifyZeroInteractions(notificationManager, emailNotificationChannel);
+ verifyNoInteractions(notificationManager, emailNotificationChannel);
}
@Test
@@ -129,10 +129,10 @@ public class ChangesOnMyIssueNotificationHandlerTest {
int deliver = underTest.deliver(notifications);
assertThat(deliver).isZero();
- verifyZeroInteractions(notificationManager);
+ verifyNoInteractions(notificationManager);
verify(emailNotificationChannel).isActivated();
verifyNoMoreInteractions(emailNotificationChannel);
- notifications.forEach(Mockito::verifyZeroInteractions);
+ notifications.forEach(Mockito::verifyNoInteractions);
}
@Test
@@ -151,7 +151,7 @@ public class ChangesOnMyIssueNotificationHandlerTest {
int deliver = underTest.deliver(ImmutableSet.of(serializer.serialize(builder)));
assertThat(deliver).isZero();
- verifyZeroInteractions(notificationManager);
+ verifyNoInteractions(notificationManager);
verify(emailNotificationChannel).isActivated();
verifyNoMoreInteractions(emailNotificationChannel);
}
@@ -182,7 +182,7 @@ public class ChangesOnMyIssueNotificationHandlerTest {
int deliver = underTest.deliver(notifications);
assertThat(deliver).isZero();
- verifyZeroInteractions(notificationManager);
+ verifyNoInteractions(notificationManager);
verify(emailNotificationChannel).isActivated();
verifyNoMoreInteractions(emailNotificationChannel);
}
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/FPOrWontFixNotificationHandlerTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/FPOrWontFixNotificationHandlerTest.java
index 318c105cc1a..1a32c475fa5 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/FPOrWontFixNotificationHandlerTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/FPOrWontFixNotificationHandlerTest.java
@@ -57,8 +57,8 @@ import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoInteractions;
import static org.mockito.Mockito.verifyNoMoreInteractions;
-import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
import static org.sonar.api.issue.Issue.RESOLUTION_FALSE_POSITIVE;
import static org.sonar.api.issue.Issue.RESOLUTION_WONT_FIX;
@@ -120,10 +120,10 @@ public class FPOrWontFixNotificationHandlerTest {
int deliver = underTest.deliver(notifications);
assertThat(deliver).isZero();
- verifyZeroInteractions(notificationManager);
+ verifyNoInteractions(notificationManager);
verify(emailNotificationChannel).isActivated();
verifyNoMoreInteractions(emailNotificationChannel);
- notifications.forEach(Mockito::verifyZeroInteractions);
+ notifications.forEach(Mockito::verifyNoInteractions);
}
@Test
@@ -176,9 +176,9 @@ public class FPOrWontFixNotificationHandlerTest {
assertThat(deliver).isZero();
verify(serializer, times(notifications.size())).from(any(IssuesChangesNotification.class));
- verifyZeroInteractions(changeMock);
+ verifyNoInteractions(changeMock);
verifyNoMoreInteractions(serializer);
- verifyZeroInteractions(notificationManager);
+ verifyNoInteractions(notificationManager);
verify(emailNotificationChannel).isActivated();
verifyNoMoreInteractions(emailNotificationChannel);
}
@@ -198,9 +198,9 @@ public class FPOrWontFixNotificationHandlerTest {
assertThat(deliver).isZero();
verify(serializer, times(notifications.size())).from(any(IssuesChangesNotification.class));
- verifyZeroInteractions(changeMock);
+ verifyNoInteractions(changeMock);
verifyNoMoreInteractions(serializer);
- verifyZeroInteractions(notificationManager);
+ verifyNoInteractions(notificationManager);
verify(emailNotificationChannel).isActivated();
verifyNoMoreInteractions(emailNotificationChannel);
}
@@ -257,7 +257,7 @@ public class FPOrWontFixNotificationHandlerTest {
verifyNoMoreInteractions(notificationManager);
verify(emailNotificationChannel).isActivated();
verifyNoMoreInteractions(emailNotificationChannel);
- verifyZeroInteractions(changeMock);
+ verifyNoInteractions(changeMock);
}
@Test
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/MyNewIssuesNotificationHandlerTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/MyNewIssuesNotificationHandlerTest.java
index 56f155d8380..6e3684715a8 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/MyNewIssuesNotificationHandlerTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/MyNewIssuesNotificationHandlerTest.java
@@ -41,8 +41,8 @@ import static org.apache.commons.lang.RandomStringUtils.randomAlphabetic;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoInteractions;
import static org.mockito.Mockito.verifyNoMoreInteractions;
-import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
import static org.sonar.server.notification.NotificationDispatcherMetadata.GLOBAL_NOTIFICATION;
import static org.sonar.server.notification.NotificationDispatcherMetadata.PER_PROJECT_NOTIFICATION;
@@ -92,7 +92,7 @@ public class MyNewIssuesNotificationHandlerTest {
int deliver = underTest.deliver(Collections.emptyList());
assertThat(deliver).isZero();
- verifyZeroInteractions(notificationManager, emailNotificationChannel);
+ verifyNoInteractions(notificationManager, emailNotificationChannel);
}
@Test
@@ -105,10 +105,10 @@ public class MyNewIssuesNotificationHandlerTest {
int deliver = underTest.deliver(notifications);
assertThat(deliver).isZero();
- verifyZeroInteractions(notificationManager);
+ verifyNoInteractions(notificationManager);
verify(emailNotificationChannel).isActivated();
verifyNoMoreInteractions(emailNotificationChannel);
- notifications.forEach(Mockito::verifyZeroInteractions);
+ notifications.forEach(Mockito::verifyNoInteractions);
}
@Test
@@ -121,7 +121,7 @@ public class MyNewIssuesNotificationHandlerTest {
int deliver = underTest.deliver(notifications);
assertThat(deliver).isZero();
- verifyZeroInteractions(notificationManager);
+ verifyNoInteractions(notificationManager);
verify(emailNotificationChannel).isActivated();
verifyNoMoreInteractions(emailNotificationChannel);
notifications.forEach(notification -> {
@@ -140,7 +140,7 @@ public class MyNewIssuesNotificationHandlerTest {
int deliver = underTest.deliver(notifications);
assertThat(deliver).isZero();
- verifyZeroInteractions(notificationManager);
+ verifyNoInteractions(notificationManager);
verify(emailNotificationChannel).isActivated();
verifyNoMoreInteractions(emailNotificationChannel);
notifications.forEach(notification -> {
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewIssuesNotificationHandlerTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewIssuesNotificationHandlerTest.java
index b90f93b78a4..5abc5adc698 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewIssuesNotificationHandlerTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewIssuesNotificationHandlerTest.java
@@ -40,8 +40,8 @@ import static org.apache.commons.lang.RandomStringUtils.randomAlphabetic;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoInteractions;
import static org.mockito.Mockito.verifyNoMoreInteractions;
-import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
import static org.sonar.server.notification.NotificationDispatcherMetadata.GLOBAL_NOTIFICATION;
import static org.sonar.server.notification.NotificationDispatcherMetadata.PER_PROJECT_NOTIFICATION;
@@ -90,7 +90,7 @@ public class NewIssuesNotificationHandlerTest {
int deliver = underTest.deliver(Collections.emptyList());
assertThat(deliver).isZero();
- verifyZeroInteractions(notificationManager, emailNotificationChannel);
+ verifyNoInteractions(notificationManager, emailNotificationChannel);
}
@Test
@@ -103,10 +103,10 @@ public class NewIssuesNotificationHandlerTest {
int deliver = underTest.deliver(notifications);
assertThat(deliver).isZero();
- verifyZeroInteractions(notificationManager);
+ verifyNoInteractions(notificationManager);
verify(emailNotificationChannel).isActivated();
verifyNoMoreInteractions(emailNotificationChannel);
- notifications.forEach(Mockito::verifyZeroInteractions);
+ notifications.forEach(Mockito::verifyNoInteractions);
}
@Test
@@ -119,7 +119,7 @@ public class NewIssuesNotificationHandlerTest {
int deliver = underTest.deliver(notifications);
assertThat(deliver).isZero();
- verifyZeroInteractions(notificationManager);
+ verifyNoInteractions(notificationManager);
verify(emailNotificationChannel).isActivated();
verifyNoMoreInteractions(emailNotificationChannel);
notifications.forEach(notification -> {
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/notification/NotificationServiceTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/notification/NotificationServiceTest.java
index a39d505306b..546a2997297 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/notification/NotificationServiceTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/notification/NotificationServiceTest.java
@@ -40,8 +40,8 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoInteractions;
import static org.mockito.Mockito.verifyNoMoreInteractions;
-import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
public class NotificationServiceTest {
@@ -75,7 +75,7 @@ public class NotificationServiceTest {
NotificationService underTest = new NotificationService(dbClient);
assertThat(underTest.deliverEmails(notifications)).isZero();
- verifyZeroInteractions(dbClient);
+ verifyNoInteractions(dbClient);
}
@Test
@@ -87,8 +87,8 @@ public class NotificationServiceTest {
NotificationService underTest = new NotificationService(dbClient, new NotificationDispatcher[] {dispatcher});
assertThat(underTest.deliverEmails(notifications)).isZero();
- verifyZeroInteractions(dispatcher);
- verifyZeroInteractions(dbClient);
+ verifyNoInteractions(dispatcher);
+ verifyNoInteractions(dbClient);
}
@Test
@@ -99,7 +99,7 @@ public class NotificationServiceTest {
new NotificationHandler[] {handler1, handler2});
assertThat(underTest.deliverEmails(Collections.emptyList())).isZero();
- verifyZeroInteractions(handler1, handler2);
+ verifyNoInteractions(handler1, handler2);
}
@Test
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/qualitygate/notification/QGChangeNotificationHandlerTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/qualitygate/notification/QGChangeNotificationHandlerTest.java
index ed795d13d2f..41d3689b05e 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/qualitygate/notification/QGChangeNotificationHandlerTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/qualitygate/notification/QGChangeNotificationHandlerTest.java
@@ -38,8 +38,8 @@ import static org.apache.commons.lang.RandomStringUtils.randomAlphabetic;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoInteractions;
import static org.mockito.Mockito.verifyNoMoreInteractions;
-import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
import static org.sonar.server.notification.NotificationDispatcherMetadata.GLOBAL_NOTIFICATION;
import static org.sonar.server.notification.NotificationDispatcherMetadata.PER_PROJECT_NOTIFICATION;
@@ -88,7 +88,7 @@ public class QGChangeNotificationHandlerTest {
int deliver = underTest.deliver(Collections.emptyList());
assertThat(deliver).isZero();
- verifyZeroInteractions(notificationManager, emailNotificationChannel);
+ verifyNoInteractions(notificationManager, emailNotificationChannel);
}
@Test
@@ -101,10 +101,10 @@ public class QGChangeNotificationHandlerTest {
int deliver = underTest.deliver(notifications);
assertThat(deliver).isZero();
- verifyZeroInteractions(notificationManager);
+ verifyNoInteractions(notificationManager);
verify(emailNotificationChannel).isActivated();
verifyNoMoreInteractions(emailNotificationChannel);
- notifications.forEach(Mockito::verifyZeroInteractions);
+ notifications.forEach(Mockito::verifyNoInteractions);
}
@Test
@@ -117,7 +117,7 @@ public class QGChangeNotificationHandlerTest {
int deliver = underTest.deliver(notifications);
assertThat(deliver).isZero();
- verifyZeroInteractions(notificationManager);
+ verifyNoInteractions(notificationManager);
verify(emailNotificationChannel).isActivated();
verifyNoMoreInteractions(emailNotificationChannel);
notifications.forEach(notification -> {