use of cn.taketoday.cache.interceptor.SimpleCacheResolver in project today-framework by TAKETODAY.
the class JCacheJavaConfigTests method emptyConfigSupport.
@Test
public void emptyConfigSupport() {
ConfigurableApplicationContext context = new AnnotationConfigApplicationContext(EmptyConfigSupportConfig.class);
DefaultJCacheOperationSource cos = context.getBean(DefaultJCacheOperationSource.class);
assertThat(cos.getCacheResolver()).isNotNull();
assertThat(cos.getCacheResolver().getClass()).isEqualTo(SimpleCacheResolver.class);
assertThat(((SimpleCacheResolver) cos.getCacheResolver()).getCacheManager()).isSameAs(context.getBean(CacheManager.class));
assertThat(cos.getExceptionCacheResolver()).isNull();
context.close();
}
use of cn.taketoday.cache.interceptor.SimpleCacheResolver in project today-framework by TAKETODAY.
the class EnableCachingTests method emptyConfigSupport.
@Test
public void emptyConfigSupport() {
ConfigurableApplicationContext context = new AnnotationConfigApplicationContext(EmptyConfigSupportConfig.class);
CacheInterceptor ci = context.getBean(CacheInterceptor.class);
assertThat(ci.getCacheResolver()).isNotNull();
assertThat(ci.getCacheResolver().getClass()).isEqualTo(SimpleCacheResolver.class);
assertThat(((SimpleCacheResolver) ci.getCacheResolver()).getCacheManager()).isSameAs(context.getBean(CacheManager.class));
context.close();
}
use of cn.taketoday.cache.interceptor.SimpleCacheResolver in project today-infrastructure by TAKETODAY.
the class JCacheJavaConfigTests method emptyConfigSupport.
@Test
public void emptyConfigSupport() {
ConfigurableApplicationContext context = new AnnotationConfigApplicationContext(EmptyConfigSupportConfig.class);
DefaultJCacheOperationSource cos = context.getBean(DefaultJCacheOperationSource.class);
assertThat(cos.getCacheResolver()).isNotNull();
assertThat(cos.getCacheResolver().getClass()).isEqualTo(SimpleCacheResolver.class);
assertThat(((SimpleCacheResolver) cos.getCacheResolver()).getCacheManager()).isSameAs(context.getBean(CacheManager.class));
assertThat(cos.getExceptionCacheResolver()).isNull();
context.close();
}
use of cn.taketoday.cache.interceptor.SimpleCacheResolver in project today-infrastructure by TAKETODAY.
the class EnableCachingTests method emptyConfigSupport.
@Test
public void emptyConfigSupport() {
ConfigurableApplicationContext context = new AnnotationConfigApplicationContext(EmptyConfigSupportConfig.class);
CacheInterceptor ci = context.getBean(CacheInterceptor.class);
assertThat(ci.getCacheResolver()).isNotNull();
assertThat(ci.getCacheResolver().getClass()).isEqualTo(SimpleCacheResolver.class);
assertThat(((SimpleCacheResolver) ci.getCacheResolver()).getCacheManager()).isSameAs(context.getBean(CacheManager.class));
context.close();
}
Aggregations