Merge branch '1.5.x'

This commit is contained in:
Phillip Webb
2017-07-06 18:38:52 -07:00
24 changed files with 188 additions and 172 deletions

View File

@@ -76,7 +76,8 @@ public class Neo4jPropertiesTests {
Neo4jProperties properties = load(true,
"spring.data.neo4j.uri=https://localhost:7474");
Configuration configuration = properties.createConfiguration();
assertDriver(configuration, Neo4jProperties.HTTP_DRIVER, "https://localhost:7474");
assertDriver(configuration, Neo4jProperties.HTTP_DRIVER,
"https://localhost:7474");
}
@Test

View File

@@ -47,13 +47,18 @@ public class OAuth2RestOperationsConfigurationTests {
public void clientIdConditionMatches() throws Exception {
EnvironmentTestUtils.addEnvironment(this.environment,
"security.oauth2.client.client-id=acme");
this.context = new SpringApplicationBuilder(OAuth2RestOperationsConfiguration.class).environment(this.environment).web(false).run();
assertThat(this.context.getBean(OAuth2RestOperationsConfiguration.class)).isNotNull();
this.context = new SpringApplicationBuilder(
OAuth2RestOperationsConfiguration.class).environment(this.environment)
.web(false).run();
assertThat(this.context.getBean(OAuth2RestOperationsConfiguration.class))
.isNotNull();
}
@Test
public void clientIdConditionDoesNotMatch() throws Exception {
this.context = new SpringApplicationBuilder(OAuth2RestOperationsConfiguration.class).environment(this.environment).web(false).run();
this.context = new SpringApplicationBuilder(
OAuth2RestOperationsConfiguration.class).environment(this.environment)
.web(false).run();
this.thrown.expect(NoSuchBeanDefinitionException.class);
this.context.getBean(OAuth2RestOperationsConfiguration.class);
}

View File

@@ -63,9 +63,8 @@ public class ResourcePropertiesTests {
@Test
public void customStaticLocationsAreNormalizedToEndWithTrailingSlash() {
this.properties.setStaticLocations(new String[] { "/foo", "/bar", "/baz/" });
assertThat(this.properties.getStaticLocations()).containsExactly("/foo/", "/bar/",
"/baz/");
String[] actual = this.properties.getStaticLocations();
assertThat(actual).containsExactly("/foo/", "/bar/", "/baz/");
}
}