Fix accidentally broken test

pull/7/head
Phillip Webb 12 years ago
parent 7d0c0fc0dd
commit 7d824a5701

@ -94,15 +94,13 @@ public class HibernateJpaAutoConfigurationTests {
public void testOpenEntityManagerInViewInterceptorNotRegisteredWhenFilterPresent()
throws Exception {
AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext();
context.register(ComponentScanDetectorConfiguration.class,
context.register(TestFilterConfiguration.class,
ComponentScanDetectorConfiguration.class,
EmbeddedDatabaseConfiguration.class, HibernateJpaAutoConfiguration.class,
PropertyPlaceholderAutoConfiguration.class, TestFilterConfiguration.class);
PropertyPlaceholderAutoConfiguration.class);
this.context = context;
this.context.refresh();
assertEquals(
0,
this.context
.getBeanNamesForType(OpenEntityManagerInViewInterceptor.class).length);
assertEquals(0, getInterceptorBeans().length);
}
@Test
@ -116,10 +114,11 @@ public class HibernateJpaAutoConfigurationTests {
PropertyPlaceholderAutoConfiguration.class);
this.context = context;
this.context.refresh();
assertEquals(
0,
this.context
.getBeanNamesForType(OpenEntityManagerInViewInterceptor.class).length);
assertEquals(0, getInterceptorBeans().length);
}
private String[] getInterceptorBeans() {
return this.context.getBeanNamesForType(OpenEntityManagerInViewInterceptor.class);
}
@ComponentScan(basePackageClasses = { City.class })

Loading…
Cancel
Save