Skip to content

Commit

Permalink
Polish
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkinsona committed Jun 16, 2017
1 parent cbae313 commit 2ffe480
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public InfluxDB influxDb() {
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());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,10 @@ public void testJpaRepositoryConfigurationWithNeo4jOverlapDisabled()
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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ public void testOverrideRedisConfiguration() {
@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();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ public void influxDbRequiresUrl() {

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

0 comments on commit 2ffe480

Please sign in to comment.