@@ -53,24 +53,24 @@ public class HazelcastJpaDependencyAutoConfigurationTests {
53
53
54
54
@ Test
55
55
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
+ });
63
63
}
64
64
65
65
@ Test
66
66
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
+ });
74
74
}
75
75
76
76
@ Test
@@ -86,8 +86,8 @@ public void noRegistrationWithNoHazelcastInstance() {
86
86
@ Test
87
87
public void noRegistrationWithNoEntityManagerFactory () {
88
88
new ApplicationContextRunner ().withUserConfiguration (HazelcastConfiguration .class )
89
- .withConfiguration (AutoConfigurations . of (
90
- HazelcastJpaDependencyAutoConfiguration .class ))
89
+ .withConfiguration (AutoConfigurations
90
+ . of ( HazelcastJpaDependencyAutoConfiguration .class ))
91
91
.run ((context ) -> assertThat (postProcessors (context )).doesNotContainKey (
92
92
"hazelcastInstanceJpaDependencyPostProcessor" ));
93
93
}
@@ -99,13 +99,13 @@ private Map<String, EntityManagerFactoryDependsOnPostProcessor> postProcessors(
99
99
100
100
private List <String > entityManagerFactoryDependencies (
101
101
AssertableApplicationContext context ) {
102
- String [] dependsOn = ((BeanDefinitionRegistry ) context .getSourceApplicationContext ())
103
- .getBeanDefinition ("entityManagerFactory" ).getDependsOn ();
102
+ String [] dependsOn = ((BeanDefinitionRegistry ) context
103
+ .getSourceApplicationContext ()).getBeanDefinition ("entityManagerFactory" )
104
+ .getDependsOn ();
104
105
return dependsOn != null ? Arrays .asList (dependsOn )
105
106
: Collections .<String >emptyList ();
106
107
}
107
108
108
-
109
109
@ Configuration
110
110
static class HazelcastConfiguration {
111
111
0 commit comments