Skip to content

Commit 34d62b0

Browse files
Added Test for AddSpringPropertyIfClassExists
1 parent da2121d commit 34d62b0

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

spring-data-eclipse-store-migration/src/test/java/software/xdev/spring/data/eclipse/store/AddSpringPropertyIfClassExistsTest.java

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,45 @@ void testSimpleYaml()
7676
);
7777
}
7878

79+
@Test
80+
void testMultipleYamlAlsoInTestFolder()
81+
{
82+
this.rewriteRun
83+
(
84+
yaml(
85+
"",
86+
"""
87+
spring:
88+
autoconfigure:
89+
exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
90+
""",
91+
s -> s.path("/src/main/resources/application.yml")
92+
),
93+
yaml(
94+
"",
95+
"""
96+
spring:
97+
autoconfigure:
98+
exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
99+
""",
100+
s -> s.path("/src/test/resources/application.yml")
101+
),
102+
yaml(
103+
"",
104+
"""
105+
spring:
106+
autoconfigure:
107+
exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
108+
""",
109+
s -> s.path("application.yml")
110+
),
111+
yaml(
112+
"",
113+
s -> s.path("no-application.yml")
114+
)
115+
);
116+
}
117+
79118
@Test
80119
void testWrongFileNameYaml()
81120
{

0 commit comments

Comments
 (0)