Skip to content

Commit a6db1b7

Browse files
committed
Merge pull request #29112 from izeye
* pr/29112: Update copyright year of changed file Polish SpringBootContextLoaderTests Closes gh-29112
2 parents 27ad080 + 5f03ace commit a6db1b7

File tree

1 file changed

+11
-22
lines changed

1 file changed

+11
-22
lines changed

spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringBootContextLoaderTests.java

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2021 the original author or authors.
2+
* Copyright 2012-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,7 +26,6 @@
2626
import org.springframework.context.annotation.Configuration;
2727
import org.springframework.core.env.StandardEnvironment;
2828
import org.springframework.test.context.ActiveProfiles;
29-
import org.springframework.test.context.ContextConfiguration;
3029
import org.springframework.test.context.MergedContextConfiguration;
3130
import org.springframework.test.context.TestContext;
3231
import org.springframework.test.context.TestContextManager;
@@ -146,65 +145,55 @@ private void assertKey(Map<String, Object> actual, String key, Object value) {
146145
assertThat(actual.get(key)).isEqualTo(value);
147146
}
148147

149-
@SpringBootTest({ "key=myValue", "anotherKey:anotherValue" })
150-
@ContextConfiguration(classes = Config.class)
148+
@SpringBootTest(properties = { "key=myValue", "anotherKey:anotherValue" }, classes = Config.class)
151149
static class SimpleConfig {
152150

153151
}
154152

155-
@SpringBootTest(properties = { "key=myValue", "anotherKey:anotherValue" })
156-
@ContextConfiguration(classes = Config.class)
153+
@SpringBootTest(properties = { "key=myValue", "anotherKey:anotherValue" }, classes = Config.class)
157154
static class SimpleConfigNonAlias {
158155

159156
}
160157

161-
@SpringBootTest("server.port=2345")
162-
@ContextConfiguration(classes = Config.class)
158+
@SpringBootTest(properties = "server.port=2345", classes = Config.class)
163159
static class OverrideConfig {
164160

165161
}
166162

167-
@SpringBootTest({ "key=myValue", "otherKey=otherValue" })
168-
@ContextConfiguration(classes = Config.class)
163+
@SpringBootTest(properties = { "key=myValue", "otherKey=otherValue" }, classes = Config.class)
169164
static class AppendConfig {
170165

171166
}
172167

173-
@SpringBootTest({ "key=my=Value", "anotherKey:another:Value" })
174-
@ContextConfiguration(classes = Config.class)
168+
@SpringBootTest(properties = { "key=my=Value", "anotherKey:another:Value" }, classes = Config.class)
175169
static class SameSeparatorInValue {
176170

177171
}
178172

179-
@SpringBootTest({ "key=my:Value", "anotherKey:another=Value" })
180-
@ContextConfiguration(classes = Config.class)
173+
@SpringBootTest(properties = { "key=my:Value", "anotherKey:another=Value" }, classes = Config.class)
181174
static class AnotherSeparatorInValue {
182175

183176
}
184177

185-
@SpringBootTest({ "key=myValue", "variables=foo=FOO\n bar=BAR" })
186-
@ContextConfiguration(classes = Config.class)
178+
@SpringBootTest(properties = { "key=myValue", "variables=foo=FOO\n bar=BAR" }, classes = Config.class)
187179
static class NewLineInValue {
188180

189181
}
190182

191-
@SpringBootTest
183+
@SpringBootTest(classes = Config.class)
192184
@ActiveProfiles({ "profile1", "profile2" })
193-
@ContextConfiguration(classes = Config.class)
194185
static class MultipleActiveProfiles {
195186

196187
}
197188

198-
@SpringBootTest
189+
@SpringBootTest(classes = Config.class)
199190
@ActiveProfiles({ "profile1,2" })
200-
@ContextConfiguration(classes = Config.class)
201191
static class ActiveProfileWithComma {
202192

203193
}
204194

205-
@SpringBootTest({ "key=myValue" })
195+
@SpringBootTest(properties = { "key=myValue" }, classes = Config.class)
206196
@ActiveProfiles({ "profile1,2" })
207-
@ContextConfiguration(classes = Config.class)
208197
static class ActiveProfileWithInlinedProperties {
209198

210199
}

0 commit comments

Comments
 (0)