Fix typos in tests

See gh-23050
pull/23052/head
dreis2211 4 years ago committed by Phillip Webb
parent d123c924a0
commit f7d6f38368

@ -154,7 +154,7 @@ class CloudPlatformTests {
}
@Test
void isEnforcedWhenEnvironmentPropertyIsMissingatchReturnsFalse() {
void isEnforcedWhenEnvironmentPropertyIsMissingReturnsFalse() {
MockEnvironment environment = new MockEnvironment();
assertThat(CloudPlatform.KUBERNETES.isEnforced(environment)).isFalse();
}
@ -172,7 +172,7 @@ class CloudPlatformTests {
}
@Test
void isEnforcedWhenBinderPropertyIsMissingatchReturnsFalse() {
void isEnforcedWhenBinderPropertyIsMissingReturnsFalse() {
Binder binder = new Binder(new MockConfigurationPropertySource());
assertThat(CloudPlatform.KUBERNETES.isEnforced(binder)).isFalse();
}

@ -50,8 +50,8 @@ class ConfigDataActivationContextTests {
}
@Test
void getCloudPlatformWhenClouldPropertyInEnvironmentDeducesCloudPlatform() {
MockEnvironment environment = createKuberntesEnvironment();
void getCloudPlatformWhenCloudPropertyInEnvironmentDeducesCloudPlatform() {
MockEnvironment environment = createKubernetesEnvironment();
Binder binder = Binder.get(environment);
ConfigDataActivationContext context = new ConfigDataActivationContext(environment, binder);
assertThat(context.getCloudPlatform()).isEqualTo(CloudPlatform.KUBERNETES);
@ -59,7 +59,7 @@ class ConfigDataActivationContextTests {
@Test
void getCloudPlatformWhenCloudPropertyHasBeenContributedDuringInitialLoadDeducesCloudPlatform() {
Environment environment = createKuberntesEnvironment();
Environment environment = createKubernetesEnvironment();
Binder binder = new Binder(
new MapConfigurationPropertySource(Collections.singletonMap("spring.main.cloud-platform", "HEROKU")));
ConfigDataActivationContext context = new ConfigDataActivationContext(environment, binder);
@ -85,7 +85,7 @@ class ConfigDataActivationContextTests {
assertThat(context.getProfiles()).isEqualTo(profiles);
}
private MockEnvironment createKuberntesEnvironment() {
private MockEnvironment createKubernetesEnvironment() {
MockEnvironment environment = new MockEnvironment();
Map<String, Object> map = new LinkedHashMap<>();
map.put("KUBERNETES_SERVICE_HOST", "host");

@ -218,7 +218,7 @@ class ConfigDataEnvironmentPostProcessorIntegrationTests {
}
@Test
void runWhenHasSystemPropertyLoadsWithSystemPropertyTakingPrecendence() {
void runWhenHasSystemPropertyLoadsWithSystemPropertyTakingPrecedence() {
System.setProperty("the.property", "fromsystem");
ConfigurableApplicationContext context = this.application.run("--spring.config.name=testproperties");
String property = context.getEnvironment().getProperty("the.property");
@ -226,7 +226,7 @@ class ConfigDataEnvironmentPostProcessorIntegrationTests {
}
@Test
void runWhenHasDefaultPropertiesIncluesDefaultPropertiesLast() {
void runWhenHasDefaultPropertiesIncludesDefaultPropertiesLast() {
this.application.setDefaultProperties(Collections.singletonMap("my.fallback", "foo"));
ConfigurableApplicationContext context = this.application.run();
String property = context.getEnvironment().getProperty("my.fallback");
@ -249,7 +249,7 @@ class ConfigDataEnvironmentPostProcessorIntegrationTests {
}
@Test
void runWhenProgrammticallySetProfilesLoadsWithSetProfilesTakePrecedenceOverDefaultProfile() {
void runWhenProgrammaticallySetProfilesLoadsWithSetProfilesTakePrecedenceOverDefaultProfile() {
this.application.setAdditionalProfiles("other");
ConfigurableApplicationContext context = this.application.run();
String property = context.getEnvironment().getProperty("my.property");

@ -149,7 +149,7 @@ class ConfigDataEnvironmentTests {
}
@Test
void processAndApplyMovesDefaultProperySourceToLast(TestInfo info) {
void processAndApplyMovesDefaultPropertySourceToLast(TestInfo info) {
MockPropertySource defaultPropertySource = new MockPropertySource("defaultProperties");
this.environment.getPropertySources().addFirst(defaultPropertySource);
this.environment.setProperty("spring.config.location", getConfigLocation(info));
@ -188,7 +188,7 @@ class ConfigDataEnvironmentTests {
}
@Test
@Disabled("Disabled until spring.profiles suppport is dropped")
@Disabled("Disabled until spring.profiles support is dropped")
void processAndApplyWhenHasInvalidPropertyThrowsException() {
this.environment.setProperty("spring.profile", "a");
ConfigDataEnvironment configDataEnvironment = new ConfigDataEnvironment(this.logFactory, this.bootstrapRegistry,

@ -42,9 +42,9 @@ class InvalidConfigDataPropertyExceptionTests {
private ConfigurationPropertyName replacement = ConfigurationPropertyName.of("replacement");
private ConfigurationPropertyName invaid = ConfigurationPropertyName.of("invalid");
private ConfigurationPropertyName invalid = ConfigurationPropertyName.of("invalid");
private ConfigurationProperty property = new ConfigurationProperty(this.invaid, "bad", MockOrigin.of("origin"));
private ConfigurationProperty property = new ConfigurationProperty(this.invalid, "bad", MockOrigin.of("origin"));
private Log logger = mock(Log.class);
@ -68,7 +68,7 @@ class InvalidConfigDataPropertyExceptionTests {
@Test
void createWhenNoOriginHasCorrectMessage() {
ConfigurationProperty property = new ConfigurationProperty(this.invaid, "bad", null);
ConfigurationProperty property = new ConfigurationProperty(this.invalid, "bad", null);
assertThat(new InvalidConfigDataPropertyException(property, this.replacement, this.location)).hasMessage(
"Property 'invalid' imported from location 'test' is invalid and should be replaced with 'replacement'");
}
@ -95,7 +95,7 @@ class InvalidConfigDataPropertyExceptionTests {
}
@Test
@Disabled("Disabled until spring.profiles suppport is dropped")
@Disabled("Disabled until spring.profiles support is dropped")
void throwOrWarnWhenHasInvalidPropertyThrowsException() {
MockPropertySource propertySource = new MockPropertySource();
propertySource.setProperty("spring.profiles", "a");

@ -50,7 +50,7 @@ class NotConstructorBoundInjectionFailureAnalyzerTests {
}
@Test
void failureAnaylsisForNonConstructorBoundProperties() {
void failureAnalysisForNonConstructorBoundProperties() {
FailureAnalysis analysis = analyzeFailure(createFailure(JavaBeanBoundPropertiesConfiguration.class));
assertThat(analysis).isNull();
}

@ -49,7 +49,7 @@ class PropertiesPropertySourceLoaderTests {
}
@Test
void loadMultiDocumentPropertiesWithSeparatorAtTheBeginningofFile() throws Exception {
void loadMultiDocumentPropertiesWithSeparatorAtTheBeginningOfFile() throws Exception {
List<PropertySource<?>> loaded = this.loader.load("test.properties",
new ClassPathResource("multi-document-properties-2.properties", getClass()));
assertThat(loaded.size()).isEqualTo(2);

@ -269,7 +269,7 @@ class DefaultErrorAttributesTests {
}
@Test
void whenGetMessageIsOverridenThenMessageAttributeContainsValueReturnedFromIt() {
void whenGetMessageIsOverriddenThenMessageAttributeContainsValueReturnedFromIt() {
Map<String, Object> attributes = new DefaultErrorAttributes() {
@Override

Loading…
Cancel
Save