ottlinger commented on code in PR #249:
URL: https://github.com/apache/creadur-rat/pull/249#discussion_r1599795646


##########
apache-rat-core/src/test/java/org/apache/rat/analysis/matchers/SPDXMatcherTest.java:
##########
@@ -22,22 +22,32 @@
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import org.apache.rat.analysis.IHeaderMatcher;
+import org.apache.rat.analysis.IHeaders;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
 public class SPDXMatcherTest {
 
-    IHeaderMatcher target = SPDXMatcherFactory.INSTANCE.create("hello");
+    IHeaderMatcher target1 = SPDXMatcherFactory.INSTANCE.create("hello");
+    IHeaderMatcher target2 = SPDXMatcherFactory.INSTANCE.create("world");
+    IHeaderMatcher target3 = SPDXMatcherFactory.INSTANCE.create("goodbye");
 
     @BeforeEach
     public void setup() {
-        target.reset();
+        target1.reset();
     }
 
     @Test
     public void testMatch() {
-        
assertFalse(target.matches(AbstractMatcherTest.makeHeaders("SPDX-License-Identifier:
 Apache-2", null)));
-        
assertTrue(target.matches(AbstractMatcherTest.makeHeaders("SPDX-License-Identifier:
 hello", null)));
-        target.reset();
+        StringBuilder sb = new StringBuilder()
+                .append("SPDX-License-Identifier: 
world").append(System.lineSeparator())

Review Comment:
   constant from above could be used in these tests as well.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to