aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine/src
diff options
context:
space:
mode:
authorBruno Andrade <bruno@artsman.dev>2023-06-19 12:20:35 +0100
committersonartech <sonartech@sonarsource.com>2023-06-19 20:03:13 +0000
commitc1b811da429ce068a15b21d87aa969dd6d956a72 (patch)
tree8f27024ace955e92d7af0f9c761ad761e68852b3 /sonar-scanner-engine/src
parent264a9740a7935d9e5af42bb8f5e4cd67dec64b65 (diff)
downloadsonarqube-c1b811da429ce068a15b21d87aa969dd6d956a72.tar.gz
sonarqube-c1b811da429ce068a15b21d87aa969dd6d956a72.zip
NO-JIRA (code smell fix): using isEmpty, isTrue, isNegative for better readability
Diffstat (limited to 'sonar-scanner-engine/src')
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/pattern/IssueExclusionPatternInitializerTest.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/pattern/IssueExclusionPatternInitializerTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/pattern/IssueExclusionPatternInitializerTest.java
index 415df5aa832..35f9178c9f3 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/pattern/IssueExclusionPatternInitializerTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/pattern/IssueExclusionPatternInitializerTest.java
@@ -42,7 +42,7 @@ public class IssueExclusionPatternInitializerTest {
public void testNoConfiguration() {
patternsInitializer = new IssueExclusionPatternInitializer(settings.asConfig());
assertThat(patternsInitializer.hasConfiguredPatterns()).isFalse();
- assertThat(patternsInitializer.getMulticriteriaPatterns().size()).isZero();
+ assertThat(patternsInitializer.getMulticriteriaPatterns()).isEmpty();
}
@Test(expected = MessageException.class)
@@ -75,9 +75,9 @@ public class IssueExclusionPatternInitializerTest {
assertThat(patternsInitializer.hasConfiguredPatterns()).isTrue();
assertThat(patternsInitializer.hasFileContentPattern()).isTrue();
assertThat(patternsInitializer.hasMulticriteriaPatterns()).isFalse();
- assertThat(patternsInitializer.getMulticriteriaPatterns().size()).isZero();
+ assertThat(patternsInitializer.getMulticriteriaPatterns()).isEmpty();
assertThat(patternsInitializer.getBlockPatterns()).hasSize(3);
- assertThat(patternsInitializer.getAllFilePatterns().size()).isZero();
+ assertThat(patternsInitializer.getAllFilePatterns()).isEmpty();
}
@Test(expected = MessageException.class)
@@ -98,8 +98,8 @@ public class IssueExclusionPatternInitializerTest {
assertThat(patternsInitializer.hasConfiguredPatterns()).isTrue();
assertThat(patternsInitializer.hasFileContentPattern()).isTrue();
assertThat(patternsInitializer.hasMulticriteriaPatterns()).isFalse();
- assertThat(patternsInitializer.getMulticriteriaPatterns().size()).isZero();
- assertThat(patternsInitializer.getBlockPatterns().size()).isZero();
+ assertThat(patternsInitializer.getMulticriteriaPatterns()).isEmpty();
+ assertThat(patternsInitializer.getBlockPatterns()).isEmpty();
assertThat(patternsInitializer.getAllFilePatterns()).hasSize(2);
}