aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver-api
diff options
context:
space:
mode:
authorantoine.vinot <antoine.vinot@sonarsource.com>2024-10-21 13:50:34 +0200
committersonartech <sonartech@sonarsource.com>2024-10-22 20:03:09 +0000
commit77cc1d1e0db19c2b135313381328fc4f2545a67a (patch)
tree8561849d267d8313146ebfc2444940f861561d6a /server/sonar-webserver-api
parent752c801152e6701e106603b09ee7850deb1ae546 (diff)
downloadsonarqube-77cc1d1e0db19c2b135313381328fc4f2545a67a.tar.gz
sonarqube-77cc1d1e0db19c2b135313381328fc4f2545a67a.zip
NO-JIRA Fix SQ Issues
Diffstat (limited to 'server/sonar-webserver-api')
-rw-r--r--server/sonar-webserver-api/src/test/java/org/sonar/server/http/JavaxHttpResponseTest.java4
-rw-r--r--server/sonar-webserver-api/src/test/java/org/sonar/server/qualitygate/changeevent/QGChangeEventListenersImplTest.java8
2 files changed, 6 insertions, 6 deletions
diff --git a/server/sonar-webserver-api/src/test/java/org/sonar/server/http/JavaxHttpResponseTest.java b/server/sonar-webserver-api/src/test/java/org/sonar/server/http/JavaxHttpResponseTest.java
index 999ec74c99f..a936cfcddd2 100644
--- a/server/sonar-webserver-api/src/test/java/org/sonar/server/http/JavaxHttpResponseTest.java
+++ b/server/sonar-webserver-api/src/test/java/org/sonar/server/http/JavaxHttpResponseTest.java
@@ -27,7 +27,7 @@ import javax.servlet.http.HttpServletResponse;
import org.junit.Test;
import org.sonar.api.server.http.Cookie;
-import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
@@ -50,7 +50,7 @@ public class JavaxHttpResponseTest {
assertThat(underTest.getDelegate()).isSameAs(responseMock);
assertThat(underTest.getHeader("h1")).isEqualTo("hvalue1");
- assertThat(underTest.getHeaders("h1")).asList().containsExactly("hvalue1");
+ assertThat(underTest.getHeaders("h1")).containsExactly("hvalue1");
assertThat(underTest.getStatus()).isEqualTo(200);
assertThat(underTest.getWriter()).isEqualTo(writer);
assertThat(underTest.getOutputStream()).isEqualTo(outputStream);
diff --git a/server/sonar-webserver-api/src/test/java/org/sonar/server/qualitygate/changeevent/QGChangeEventListenersImplTest.java b/server/sonar-webserver-api/src/test/java/org/sonar/server/qualitygate/changeevent/QGChangeEventListenersImplTest.java
index d447dc22165..4c203432ef8 100644
--- a/server/sonar-webserver-api/src/test/java/org/sonar/server/qualitygate/changeevent/QGChangeEventListenersImplTest.java
+++ b/server/sonar-webserver-api/src/test/java/org/sonar/server/qualitygate/changeevent/QGChangeEventListenersImplTest.java
@@ -167,9 +167,9 @@ public class QGChangeEventListenersImplTest {
@Test
public void broadcastOnIssueChange_passes_immutable_set_of_ChangedIssues() {
- QGChangeEventListenersImpl underTest = new QGChangeEventListenersImpl(Set.of(listener1));
+ var qgChangeEventListeners = new QGChangeEventListenersImpl(Set.of(listener1));
- underTest.broadcastOnIssueChange(oneIssueOnComponent1, singletonList(component1QGChangeEvent), false);
+ qgChangeEventListeners.broadcastOnIssueChange(oneIssueOnComponent1, singletonList(component1QGChangeEvent), false);
ArgumentCaptor<Set<ChangedIssue>> changedIssuesCaptor = newSetCaptor();
inOrder.verify(listener1).onIssueChanges(same(component1QGChangeEvent), changedIssuesCaptor.capture());
@@ -178,9 +178,9 @@ public class QGChangeEventListenersImplTest {
@Test
public void broadcastOnIssueChange_has_no_effect_when_no_listener() {
- QGChangeEventListenersImpl underTest = new QGChangeEventListenersImpl(Set.of());
+ var qgChangeEventListeners = new QGChangeEventListenersImpl(Set.of());
- underTest.broadcastOnIssueChange(oneIssueOnComponent1, singletonList(component1QGChangeEvent), false);
+ qgChangeEventListeners.broadcastOnIssueChange(oneIssueOnComponent1, singletonList(component1QGChangeEvent), false);
verifyNoInteractions(listener1, listener2, listener3);
}