Skip to content

Commit 30ff329

Browse files
committed
Polish
1 parent 71ade55 commit 30ff329

File tree

2 files changed

+23
-22
lines changed

2 files changed

+23
-22
lines changed

spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/LiquibaseEndpointTests.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ public void invoke() throws Exception {
5151
public void invokeWithCustomSchema() throws Exception {
5252
this.context.close();
5353
this.context = new AnnotationConfigApplicationContext();
54-
TestPropertyValues.of("liquibase.default-schema=CUSTOMSCHEMA",
55-
"spring.datasource.generate-unique-name=true",
56-
"spring.datasource.schema=classpath:/db/create-custom-schema.sql")
54+
TestPropertyValues
55+
.of("liquibase.default-schema=CUSTOMSCHEMA",
56+
"spring.datasource.generate-unique-name=true",
57+
"spring.datasource.schema=classpath:/db/create-custom-schema.sql")
5758
.applyTo(this.context);
5859
this.context.register(CustomSchemaConfig.class);
5960
this.context.refresh();

spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastJpaDependencyAutoConfigurationTests.java

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,24 @@ public class HazelcastJpaDependencyAutoConfigurationTests {
5353

5454
@Test
5555
public void registrationIfHazelcastInstanceHasRegularBeanName() {
56-
this.contextRunner.withUserConfiguration(
57-
HazelcastConfiguration.class).run((context) -> {
58-
assertThat(postProcessors(context))
59-
.containsKey("hazelcastInstanceJpaDependencyPostProcessor");
60-
assertThat(entityManagerFactoryDependencies(context)).contains(
61-
"hazelcastInstance");
62-
});
56+
this.contextRunner.withUserConfiguration(HazelcastConfiguration.class)
57+
.run((context) -> {
58+
assertThat(postProcessors(context))
59+
.containsKey("hazelcastInstanceJpaDependencyPostProcessor");
60+
assertThat(entityManagerFactoryDependencies(context))
61+
.contains("hazelcastInstance");
62+
});
6363
}
6464

6565
@Test
6666
public void noRegistrationIfHazelcastInstanceHasCustomBeanName() {
67-
this.contextRunner.withUserConfiguration(
68-
HazelcastCustomNameConfiguration.class).run((context) -> {
69-
assertThat(entityManagerFactoryDependencies(context))
70-
.doesNotContain("hazelcastInstance");
71-
assertThat(postProcessors(context))
72-
.doesNotContainKey("hazelcastInstanceJpaDependencyPostProcessor");
73-
});
67+
this.contextRunner.withUserConfiguration(HazelcastCustomNameConfiguration.class)
68+
.run((context) -> {
69+
assertThat(entityManagerFactoryDependencies(context))
70+
.doesNotContain("hazelcastInstance");
71+
assertThat(postProcessors(context)).doesNotContainKey(
72+
"hazelcastInstanceJpaDependencyPostProcessor");
73+
});
7474
}
7575

7676
@Test
@@ -86,8 +86,8 @@ public void noRegistrationWithNoHazelcastInstance() {
8686
@Test
8787
public void noRegistrationWithNoEntityManagerFactory() {
8888
new ApplicationContextRunner().withUserConfiguration(HazelcastConfiguration.class)
89-
.withConfiguration(AutoConfigurations.of(
90-
HazelcastJpaDependencyAutoConfiguration.class))
89+
.withConfiguration(AutoConfigurations
90+
.of(HazelcastJpaDependencyAutoConfiguration.class))
9191
.run((context) -> assertThat(postProcessors(context)).doesNotContainKey(
9292
"hazelcastInstanceJpaDependencyPostProcessor"));
9393
}
@@ -99,13 +99,13 @@ private Map<String, EntityManagerFactoryDependsOnPostProcessor> postProcessors(
9999

100100
private List<String> entityManagerFactoryDependencies(
101101
AssertableApplicationContext context) {
102-
String[] dependsOn = ((BeanDefinitionRegistry) context.getSourceApplicationContext())
103-
.getBeanDefinition("entityManagerFactory").getDependsOn();
102+
String[] dependsOn = ((BeanDefinitionRegistry) context
103+
.getSourceApplicationContext()).getBeanDefinition("entityManagerFactory")
104+
.getDependsOn();
104105
return dependsOn != null ? Arrays.asList(dependsOn)
105106
: Collections.<String>emptyList();
106107
}
107108

108-
109109
@Configuration
110110
static class HazelcastConfiguration {
111111

0 commit comments

Comments
 (0)