This commit is contained in:
Ken Stevens 2019-03-29 15:17:55 -04:00
parent b1d41a8211
commit 60cf426bf4
1 changed files with 6 additions and 4 deletions

View File

@ -201,8 +201,10 @@ public class InterceptorServiceTest {
@ComponentScan(basePackages = "ca.uhn.fhir.jpa.model") @ComponentScan(basePackages = "ca.uhn.fhir.jpa.model")
static class InterceptorRegistryTestCtxConfig { static class InterceptorRegistryTestCtxConfig {
@Autowired @Bean
private IInterceptorRegistry myInterceptorRegistry; public InterceptorService interceptorService() {
return new InterceptorService("test");
}
/** /**
* Note: Orders are deliberately reversed to make sure we get the orders right * Note: Orders are deliberately reversed to make sure we get the orders right
@ -211,7 +213,7 @@ public class InterceptorServiceTest {
@Bean @Bean
public MyTestInterceptorTwo interceptor1() { public MyTestInterceptorTwo interceptor1() {
MyTestInterceptorTwo retVal = new MyTestInterceptorTwo(); MyTestInterceptorTwo retVal = new MyTestInterceptorTwo();
myInterceptorRegistry.registerInterceptor(retVal); interceptorService().registerInterceptor(retVal);
return retVal; return retVal;
} }
@ -222,7 +224,7 @@ public class InterceptorServiceTest {
@Bean @Bean
public MyTestInterceptorOne interceptor2() { public MyTestInterceptorOne interceptor2() {
MyTestInterceptorOne retVal = new MyTestInterceptorOne(); MyTestInterceptorOne retVal = new MyTestInterceptorOne();
myInterceptorRegistry.registerInterceptor(retVal); interceptorService().registerInterceptor(retVal);
return retVal; return retVal;
} }