Skip to content

Commit 8f5e6cc

Browse files
committed
test: Test that verifies that #55 is fixed
1 parent 1bdb139 commit 8f5e6cc

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

components/sbm-core/src/test/java/org/springframework/sbm/project/buildfile/OpenRewriteMavenBuildFileTest.java

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2656,26 +2656,27 @@ void hasParentWithParentShouldReturnParent() {
26562656

26572657
@Test
26582658
void upgradeParentVersion() {
2659-
String pomXml =
2660-
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
2661-
"<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" +
2662-
" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd\">\n" +
2663-
" <modelVersion>4.0.0</modelVersion>\n" +
2664-
" <parent>\n" +
2665-
" <groupId>org.springframework.boot</groupId>\n" +
2666-
" <artifactId>spring-boot-starter-parent</artifactId>\n" +
2667-
" <version>2.4.12</version>\n" +
2668-
" <relativePath/> <!-- lookup parent from repository -->\n" +
2669-
" </parent>\n" +
2670-
" <groupId>com.example</groupId>\n" +
2671-
" <artifactId>spring-boot-24-to-25-example</artifactId>\n" +
2672-
" <version>0.0.1-SNAPSHOT</version>\n" +
2673-
" <name>spring-boot-2.4-to-2.5-example</name>\n" +
2674-
" <description>spring-boot-2.4-to-2.5-example</description>\n" +
2675-
" <properties>\n" +
2676-
" <java.version>11</java.version>\n" +
2677-
" </properties>\n" +
2678-
"</project>\n";
2659+
String pomXml = """
2660+
<?xml version="1.0" encoding="UTF-8"?>
2661+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2662+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
2663+
<modelVersion>4.0.0</modelVersion>
2664+
<parent>
2665+
<groupId>org.springframework.boot</groupId>
2666+
<artifactId>spring-boot-starter-parent</artifactId>
2667+
<version>2.4.12</version>
2668+
<relativePath/> <!-- lookup parent from repository -->
2669+
</parent>
2670+
<groupId>com.example</groupId>
2671+
<artifactId>spring-boot-24-to-25-example</artifactId>
2672+
<version>0.0.1-SNAPSHOT</version>
2673+
<name>spring-boot-2.4-to-2.5-example</name>
2674+
<description>spring-boot-2.4-to-2.5-example</description>
2675+
<properties>
2676+
<java.version>11</java.version>
2677+
</properties>
2678+
</project>
2679+
""";
26792680

26802681
BuildFile openRewriteMavenBuildFile = TestProjectContext.buildProjectContext().withMavenRootBuildFileSource(pomXml).build().getBuildFile();
26812682

0 commit comments

Comments
 (0)