Commit 2ffe4804 authored by Andy Wilkinson's avatar Andy Wilkinson

Polish

parent cbae3136
......@@ -53,8 +53,8 @@ public class InfluxDbAutoConfiguration {
if (Strings.isNullOrEmpty(this.properties.getUser())) {
return InfluxDBFactory.connect(this.properties.getUrl());
}
return InfluxDBFactory.connect(this.properties.getUrl(), this.properties.getUser(),
this.properties.getPassword());
return InfluxDBFactory.connect(this.properties.getUrl(),
this.properties.getUser(), this.properties.getPassword());
}
}
......@@ -91,12 +91,10 @@ public class MixedNeo4jRepositoriesAutoConfigurationTests {
assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
private void load(Class config, String... environment) {
private void load(Class<?> config, String... environment) {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
TestPropertyValues.of(environment)
.and("spring.datasource.initialize", "false")
.and("spring.data.neo4j.uri", "http://localhost:8989")
.applyTo(ctx);
TestPropertyValues.of(environment).and("spring.datasource.initialize", "false")
.and("spring.data.neo4j.uri", "http://localhost:8989").applyTo(ctx);
ctx.register(config);
ctx.register(DataSourceAutoConfiguration.class,
HibernateJpaAutoConfiguration.class,
......
......@@ -86,7 +86,8 @@ public class RedisAutoConfigurationTests {
@Test
public void testCustomizeRedisConfiguration() {
load(CustomConfiguration.class);
LettuceConnectionFactory cf = this.context.getBean(LettuceConnectionFactory.class);
LettuceConnectionFactory cf = this.context
.getBean(LettuceConnectionFactory.class);
assertThat(cf.isUseSsl()).isTrue();
}
......
......@@ -50,8 +50,7 @@ public class InfluxDbAutoConfigurationTests {
@Test
public void influxDbCanBeCustomized() {
load("spring.influx.url=http://localhost",
"spring.influx.password:password",
load("spring.influx.url=http://localhost", "spring.influx.password:password",
"spring.influx.user:user");
assertThat(this.context.getBeansOfType(InfluxDB.class)).hasSize(1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment