@@ -42,7 +42,7 @@ class BuildFileParserTest {
42
42
public class GivenSimpleMavenMultiModuleProject {
43
43
44
44
@ Language ("xml" )
45
- private String pom1 =
45
+ private static final String POM_1 =
46
46
"""
47
47
<?xml version="1.0" encoding="UTF-8"?>
48
48
<project xmlns="http://maven.apache.org/POM/4.0.0"
@@ -60,7 +60,7 @@ public class GivenSimpleMavenMultiModuleProject {
60
60
""" ;
61
61
62
62
@ Language ("xml" )
63
- private String pom2 =
63
+ private static final String POM_2 =
64
64
"""
65
65
<?xml version="1.0" encoding="UTF-8"?>
66
66
<project xmlns="http://maven.apache.org/POM/4.0.0"
@@ -80,7 +80,7 @@ public class GivenSimpleMavenMultiModuleProject {
80
80
""" ;
81
81
82
82
@ Language ("xml" )
83
- private String pom3 =
83
+ private static final String POM_3 =
84
84
"""
85
85
<project xmlns="http://maven.apache.org/POM/4.0.0"
86
86
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -102,11 +102,11 @@ void filterAndSortBuildFiles_shouldReturnSortedListOfFilteredBuildFiles() {
102
102
103
103
// the poms have no order
104
104
List <Resource > resources = List .of (
105
- new DummyResource ("src/test/resources/dummy/pom.xml" , "" ),
106
- new DummyResource ("module1/submodule/pom.xml" , pom3 ),
107
- new DummyResource ("pom.xml" , pom1 ),
108
- new DummyResource ("module1/pom.xml" , pom2 ),
109
- new DummyResource ("src/main/java/SomeJavaClass.java" , "" )
105
+ new DummyResource ("src/test/resources/dummy/pom.xml" , "" ), // filtered
106
+ new DummyResource ("module1/submodule/pom.xml" , POM_3 ), // pos. 3
107
+ new DummyResource ("pom.xml" , POM_1 ), // pos. 1
108
+ new DummyResource ("module1/pom.xml" , POM_2 ), // pos. 2
109
+ new DummyResource ("src/main/java/SomeJavaClass.java" , "" ) // filtered
110
110
);
111
111
112
112
// filter and sort build files
@@ -129,9 +129,9 @@ void filterAndSortBuildFiles_shouldReturnSortedListOfFilteredBuildFiles() {
129
129
void parseBuildFiles_shouldReturnSortedListOfParsedBuildFiles () {
130
130
Path baseDir = Path .of ("." ).toAbsolutePath ().normalize ();
131
131
List <Resource > filteredAndSortedBuildFiles = List .of (
132
- new DummyResource (baseDir , "module1/submodule/pom.xml" , pom3 ),
133
- new DummyResource (baseDir , "pom.xml" , pom1 ),
134
- new DummyResource (baseDir , "module1/pom.xml" , pom2 )
132
+ new DummyResource (baseDir , "module1/submodule/pom.xml" , POM_3 ),
133
+ new DummyResource (baseDir , "pom.xml" , POM_1 ),
134
+ new DummyResource (baseDir , "module1/pom.xml" , POM_2 )
135
135
);
136
136
Map <Path , List <Marker >> provenanceMarkers = new HashMap <>();
137
137
ExecutionContext executionContext = new InMemoryExecutionContext (t -> t .printStackTrace ());
0 commit comments