File tree Expand file tree Collapse file tree
rewrite-maven/src/test/java/org/openrewrite/maven Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727
2828import java .util .List ;
2929
30+ import static org .assertj .core .api .Assertions .assertThat ;
3031import static org .openrewrite .java .Assertions .mavenProject ;
3132import static org .openrewrite .maven .Assertions .pomXml ;
3233
@@ -1450,22 +1451,16 @@ void doesNotBringInMavenArguments() {
14501451 </parent>
14511452 </project>
14521453 """ ,
1453- """
1454- <project>
1455- <groupId>org.sample</groupId>
1456- <artifactId>sample</artifactId>
1457- <version>1.0.0</version>
1458- <properties>
1459- <maven.repo.local>${user.home}/.m2/repository</maven.repo.local>
1460- <owaspDb>${maven.repo.local}/blah</owaspDb>
1461- </properties>
1462- <parent>
1463- <groupId>org.springframework.boot</groupId>
1464- <artifactId>spring-boot-starter-parent</artifactId>
1465- <version>3.5.9</version>
1466- </parent>
1467- </project>
1468- """
1454+ spec -> spec .after (actual ->
1455+ assertThat (actual )
1456+ .as ("Does not bring in Maven arguments." )
1457+ .contains ("<maven.repo.local>${user.home}/.m2/repository</maven.repo.local>" )
1458+ .contains ("<owaspDb>${maven.repo.local}/blah</owaspDb>" )
1459+ .as ("Any version of Spring boot parent above `3.5.7`" )
1460+ .doesNotContain ("3.5.7" )
1461+ .containsPattern ("<version>3\\ .5\\ .\\ d+</version>" )
1462+ .actual ()
1463+ )
14691464 )
14701465 );
14711466 }
You can’t perform that action at this time.
0 commit comments