Skip to content

Commit 00cb5bb

Browse files
committed
Merge pull request #23050 from dreis2211
* pr/23050: Fix typos in tests Closes gh-23050
2 parents d123c92 + f7d6f38 commit 00cb5bb

8 files changed

+18
-18
lines changed

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/cloud/CloudPlatformTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ void isEnforcedWhenEnvironmentPropertyDoesNotMatchReturnsFalse() {
154154
}
155155

156156
@Test
157-
void isEnforcedWhenEnvironmentPropertyIsMissingatchReturnsFalse() {
157+
void isEnforcedWhenEnvironmentPropertyIsMissingReturnsFalse() {
158158
MockEnvironment environment = new MockEnvironment();
159159
assertThat(CloudPlatform.KUBERNETES.isEnforced(environment)).isFalse();
160160
}
@@ -172,7 +172,7 @@ void isEnforcedWhenBinderPropertyDoesNotMatchReturnsFalse() {
172172
}
173173

174174
@Test
175-
void isEnforcedWhenBinderPropertyIsMissingatchReturnsFalse() {
175+
void isEnforcedWhenBinderPropertyIsMissingReturnsFalse() {
176176
Binder binder = new Binder(new MockConfigurationPropertySource());
177177
assertThat(CloudPlatform.KUBERNETES.isEnforced(binder)).isFalse();
178178
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@ void getCloudPlatformWhenCloudPropertyNotPresentDeducesCloudPlatform() {
5050
}
5151

5252
@Test
53-
void getCloudPlatformWhenClouldPropertyInEnvironmentDeducesCloudPlatform() {
54-
MockEnvironment environment = createKuberntesEnvironment();
53+
void getCloudPlatformWhenCloudPropertyInEnvironmentDeducesCloudPlatform() {
54+
MockEnvironment environment = createKubernetesEnvironment();
5555
Binder binder = Binder.get(environment);
5656
ConfigDataActivationContext context = new ConfigDataActivationContext(environment, binder);
5757
assertThat(context.getCloudPlatform()).isEqualTo(CloudPlatform.KUBERNETES);
5858
}
5959

6060
@Test
6161
void getCloudPlatformWhenCloudPropertyHasBeenContributedDuringInitialLoadDeducesCloudPlatform() {
62-
Environment environment = createKuberntesEnvironment();
62+
Environment environment = createKubernetesEnvironment();
6363
Binder binder = new Binder(
6464
new MapConfigurationPropertySource(Collections.singletonMap("spring.main.cloud-platform", "HEROKU")));
6565
ConfigDataActivationContext context = new ConfigDataActivationContext(environment, binder);
@@ -85,7 +85,7 @@ void getProfilesWhenWithProfilesReturnsProfiles() {
8585
assertThat(context.getProfiles()).isEqualTo(profiles);
8686
}
8787

88-
private MockEnvironment createKuberntesEnvironment() {
88+
private MockEnvironment createKubernetesEnvironment() {
8989
MockEnvironment environment = new MockEnvironment();
9090
Map<String, Object> map = new LinkedHashMap<>();
9191
map.put("KUBERNETES_SERVICE_HOST", "host");

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,15 +218,15 @@ void runWhenHasCommandLinePropertiesLoadsWithCommandLineTakingPrecedence() {
218218
}
219219

220220
@Test
221-
void runWhenHasSystemPropertyLoadsWithSystemPropertyTakingPrecendence() {
221+
void runWhenHasSystemPropertyLoadsWithSystemPropertyTakingPrecedence() {
222222
System.setProperty("the.property", "fromsystem");
223223
ConfigurableApplicationContext context = this.application.run("--spring.config.name=testproperties");
224224
String property = context.getEnvironment().getProperty("the.property");
225225
assertThat(property).isEqualTo("fromsystem");
226226
}
227227

228228
@Test
229-
void runWhenHasDefaultPropertiesIncluesDefaultPropertiesLast() {
229+
void runWhenHasDefaultPropertiesIncludesDefaultPropertiesLast() {
230230
this.application.setDefaultProperties(Collections.singletonMap("my.fallback", "foo"));
231231
ConfigurableApplicationContext context = this.application.run();
232232
String property = context.getEnvironment().getProperty("my.fallback");
@@ -249,7 +249,7 @@ void runWhenHasActiveProfilesFromDefaultPropertiesAndFileLoadsWithFileTakingPrec
249249
}
250250

251251
@Test
252-
void runWhenProgrammticallySetProfilesLoadsWithSetProfilesTakePrecedenceOverDefaultProfile() {
252+
void runWhenProgrammaticallySetProfilesLoadsWithSetProfilesTakePrecedenceOverDefaultProfile() {
253253
this.application.setAdditionalProfiles("other");
254254
ConfigurableApplicationContext context = this.application.run();
255255
String property = context.getEnvironment().getProperty("my.property");

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ void processAndApplyOnlyAddsActiveContributors(TestInfo info) {
149149
}
150150

151151
@Test
152-
void processAndApplyMovesDefaultProperySourceToLast(TestInfo info) {
152+
void processAndApplyMovesDefaultPropertySourceToLast(TestInfo info) {
153153
MockPropertySource defaultPropertySource = new MockPropertySource("defaultProperties");
154154
this.environment.getPropertySources().addFirst(defaultPropertySource);
155155
this.environment.setProperty("spring.config.location", getConfigLocation(info));
@@ -188,7 +188,7 @@ void processAndApplySetsActiveProfilesAndProfileGroups(TestInfo info) {
188188
}
189189

190190
@Test
191-
@Disabled("Disabled until spring.profiles suppport is dropped")
191+
@Disabled("Disabled until spring.profiles support is dropped")
192192
void processAndApplyWhenHasInvalidPropertyThrowsException() {
193193
this.environment.setProperty("spring.profile", "a");
194194
ConfigDataEnvironment configDataEnvironment = new ConfigDataEnvironment(this.logFactory, this.bootstrapRegistry,

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ class InvalidConfigDataPropertyExceptionTests {
4242

4343
private ConfigurationPropertyName replacement = ConfigurationPropertyName.of("replacement");
4444

45-
private ConfigurationPropertyName invaid = ConfigurationPropertyName.of("invalid");
45+
private ConfigurationPropertyName invalid = ConfigurationPropertyName.of("invalid");
4646

47-
private ConfigurationProperty property = new ConfigurationProperty(this.invaid, "bad", MockOrigin.of("origin"));
47+
private ConfigurationProperty property = new ConfigurationProperty(this.invalid, "bad", MockOrigin.of("origin"));
4848

4949
private Log logger = mock(Log.class);
5050

@@ -68,7 +68,7 @@ void createWhenNoReplacementHasCorrectMessage() {
6868

6969
@Test
7070
void createWhenNoOriginHasCorrectMessage() {
71-
ConfigurationProperty property = new ConfigurationProperty(this.invaid, "bad", null);
71+
ConfigurationProperty property = new ConfigurationProperty(this.invalid, "bad", null);
7272
assertThat(new InvalidConfigDataPropertyException(property, this.replacement, this.location)).hasMessage(
7373
"Property 'invalid' imported from location 'test' is invalid and should be replaced with 'replacement'");
7474
}
@@ -95,7 +95,7 @@ void getReplacementReturnsReplacement() {
9595
}
9696

9797
@Test
98-
@Disabled("Disabled until spring.profiles suppport is dropped")
98+
@Disabled("Disabled until spring.profiles support is dropped")
9999
void throwOrWarnWhenHasInvalidPropertyThrowsException() {
100100
MockPropertySource propertySource = new MockPropertySource();
101101
propertySource.setProperty("spring.profiles", "a");

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void failureAnalysisForConfigurationPropertiesThatShouldHaveBeenConstructorBound
5050
}
5151

5252
@Test
53-
void failureAnaylsisForNonConstructorBoundProperties() {
53+
void failureAnalysisForNonConstructorBoundProperties() {
5454
FailureAnalysis analysis = analyzeFailure(createFailure(JavaBeanBoundPropertiesConfiguration.class));
5555
assertThat(analysis).isNull();
5656
}

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/PropertiesPropertySourceLoaderTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void loadProperties() throws Exception {
4949
}
5050

5151
@Test
52-
void loadMultiDocumentPropertiesWithSeparatorAtTheBeginningofFile() throws Exception {
52+
void loadMultiDocumentPropertiesWithSeparatorAtTheBeginningOfFile() throws Exception {
5353
List<PropertySource<?>> loaded = this.loader.load("test.properties",
5454
new ClassPathResource("multi-document-properties-2.properties", getClass()));
5555
assertThat(loaded.size()).isEqualTo(2);

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/error/DefaultErrorAttributesTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ void path() {
269269
}
270270

271271
@Test
272-
void whenGetMessageIsOverridenThenMessageAttributeContainsValueReturnedFromIt() {
272+
void whenGetMessageIsOverriddenThenMessageAttributeContainsValueReturnedFromIt() {
273273
Map<String, Object> attributes = new DefaultErrorAttributes() {
274274

275275
@Override

0 commit comments

Comments
 (0)