use of org.springframework.cache.interceptor.CacheOperation in project spring-framework by spring-projects.
the class AnnotationCacheOperationSourceTests method customCacheManager.
@Test
public void customCacheManager() {
Collection<CacheOperation> ops = getOps(AnnotatedClass.class, "customCacheManager", 1);
CacheOperation cacheOperation = ops.iterator().next();
assertEquals("Custom cache manager not set", "custom", cacheOperation.getCacheManager());
}
use of org.springframework.cache.interceptor.CacheOperation in project spring-framework by spring-projects.
the class AnnotationCacheOperationSourceTests method customClassLevelWithCustomCacheName.
@Test
public void customClassLevelWithCustomCacheName() {
Collection<CacheOperation> ops = getOps(AnnotatedClassWithCustomDefault.class, "methodLevelCacheName", 1);
CacheOperation cacheOperation = ops.iterator().next();
assertSharedConfig(cacheOperation, "classKeyGenerator", "", "classCacheResolver", "custom");
}
use of org.springframework.cache.interceptor.CacheOperation in project spring-framework by spring-projects.
the class AnnotationCacheOperationSourceTests method partialClassLevelWithCustomCacheManager.
@Test
public void partialClassLevelWithCustomCacheManager() {
Collection<CacheOperation> ops = getOps(AnnotatedClassWithSomeDefault.class, "methodLevelCacheManager", 1);
CacheOperation cacheOperation = ops.iterator().next();
assertSharedConfig(cacheOperation, "classKeyGenerator", "custom", "", "classCacheName");
}
use of org.springframework.cache.interceptor.CacheOperation in project spring-framework by spring-projects.
the class AnnotationCacheOperationSourceTests method customKeyGeneratorInherited.
@Test
public void customKeyGeneratorInherited() {
Collection<CacheOperation> ops = getOps(AnnotatedClass.class, "customKeyGeneratorInherited", 1);
CacheOperation cacheOperation = ops.iterator().next();
assertEquals("Custom key generator not set", "custom", cacheOperation.getKeyGenerator());
}
use of org.springframework.cache.interceptor.CacheOperation in project spring-framework by spring-projects.
the class AnnotationCacheOperationSourceTests method partialClassLevelWithNoCustomization.
@Test
public void partialClassLevelWithNoCustomization() {
Collection<CacheOperation> ops = getOps(AnnotatedClassWithSomeDefault.class, "noCustomization", 1);
CacheOperation cacheOperation = ops.iterator().next();
assertSharedConfig(cacheOperation, "classKeyGenerator", "classCacheManager", "", "classCacheName");
}
Aggregations