Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ void isEnforcedWhenEnvironmentPropertyDoesNotMatchReturnsFalse() {
}

@Test
void isEnforcedWhenEnvironmentPropertyIsMissingatchReturnsFalse() {
void isEnforcedWhenEnvironmentPropertyIsMissingReturnsFalse() {
MockEnvironment environment = new MockEnvironment();
assertThat(CloudPlatform.KUBERNETES.isEnforced(environment)).isFalse();
}
Expand All @@ -172,7 +172,7 @@ void isEnforcedWhenBinderPropertyDoesNotMatchReturnsFalse() {
}

@Test
void isEnforcedWhenBinderPropertyIsMissingatchReturnsFalse() {
void isEnforcedWhenBinderPropertyIsMissingReturnsFalse() {
Binder binder = new Binder(new MockConfigurationPropertySource());
assertThat(CloudPlatform.KUBERNETES.isEnforced(binder)).isFalse();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ void getCloudPlatformWhenCloudPropertyNotPresentDeducesCloudPlatform() {
}

@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);
}

@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);
Expand All @@ -85,7 +85,7 @@ void getProfilesWhenWithProfilesReturnsProfiles() {
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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,15 @@ void runWhenHasCommandLinePropertiesLoadsWithCommandLineTakingPrecedence() {
}

@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");
assertThat(property).isEqualTo("fromsystem");
}

@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");
Expand All @@ -249,7 +249,7 @@ void runWhenHasActiveProfilesFromDefaultPropertiesAndFileLoadsWithFileTakingPrec
}

@Test
void runWhenProgrammticallySetProfilesLoadsWithSetProfilesTakePrecedenceOverDefaultProfile() {
void runWhenProgrammaticallySetProfilesLoadsWithSetProfilesTakePrecedenceOverDefaultProfile() {
this.application.setAdditionalProfiles("other");
ConfigurableApplicationContext context = this.application.run();
String property = context.getEnvironment().getProperty("my.property");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ void processAndApplyOnlyAddsActiveContributors(TestInfo info) {
}

@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));
Expand Down Expand Up @@ -188,7 +188,7 @@ void processAndApplySetsActiveProfilesAndProfileGroups(TestInfo info) {
}

@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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -68,7 +68,7 @@ void createWhenNoReplacementHasCorrectMessage() {

@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'");
}
Expand All @@ -95,7 +95,7 @@ void getReplacementReturnsReplacement() {
}

@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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void failureAnalysisForConfigurationPropertiesThatShouldHaveBeenConstructorBound
}

@Test
void failureAnaylsisForNonConstructorBoundProperties() {
void failureAnalysisForNonConstructorBoundProperties() {
FailureAnalysis analysis = analyzeFailure(createFailure(JavaBeanBoundPropertiesConfiguration.class));
assertThat(analysis).isNull();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void loadProperties() throws Exception {
}

@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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ void path() {
}

@Test
void whenGetMessageIsOverridenThenMessageAttributeContainsValueReturnedFromIt() {
void whenGetMessageIsOverriddenThenMessageAttributeContainsValueReturnedFromIt() {
Map<String, Object> attributes = new DefaultErrorAttributes() {

@Override
Expand Down