Package org.springframework.cache.interceptor

Examples of org.springframework.cache.interceptor.CacheOperation


  }

  @Test
  public void testCustomKeyGenerator() {
    Collection<CacheOperation> ops = getOps(AnnotatedClass.class, "customKeyGenerator", 1);
    CacheOperation cacheOperation = ops.iterator().next();
    assertEquals("Custom key generator not set", "custom", cacheOperation.getKeyGenerator());
  }
View Full Code Here


  }

  @Test
  public void testCustomKeyGeneratorInherited() {
    Collection<CacheOperation> ops = getOps(AnnotatedClass.class, "customKeyGeneratorInherited", 1);
    CacheOperation cacheOperation = ops.iterator().next();
    assertEquals("Custom key generator not set", "custom", cacheOperation.getKeyGenerator());
  }
View Full Code Here

  }

  @Test
  public void testCustomCacheManager() {
    Collection<CacheOperation> ops = getOps(AnnotatedClass.class, "customCacheManager", 1);
    CacheOperation cacheOperation = ops.iterator().next();
    assertEquals("Custom cache manager not set", "custom", cacheOperation.getCacheManager());
  }
View Full Code Here

  }

  @Test
  public void testCustomCacheManagerInherited() {
    Collection<CacheOperation> ops = getOps(AnnotatedClass.class, "customCacheManagerInherited", 1);
    CacheOperation cacheOperation = ops.iterator().next();
    assertEquals("Custom cache manager not set", "custom", cacheOperation.getCacheManager());
  }
View Full Code Here

  }

  @Test
  public void testCustomCacheResolver() {
    Collection<CacheOperation> ops = getOps(AnnotatedClass.class, "customCacheResolver", 1);
    CacheOperation cacheOperation = ops.iterator().next();
    assertEquals("Custom cache resolver not set", "custom", cacheOperation.getCacheResolver());
  }
View Full Code Here

  }

  @Test
  public void testCustomCacheResolverInherited() {
    Collection<CacheOperation> ops = getOps(AnnotatedClass.class, "customCacheResolverInherited", 1);
    CacheOperation cacheOperation = ops.iterator().next();
    assertEquals("Custom cache resolver not set", "custom", cacheOperation.getCacheResolver());
  }
View Full Code Here

  }

  @Test
  public void fullClassLevelWithCustomCacheName() {
    Collection<CacheOperation> ops = getOps(AnnotatedClassWithFullDefault.class, "methodLevelCacheName", 1);
    CacheOperation cacheOperation = ops.iterator().next();
    assertSharedConfig(cacheOperation, "classKeyGenerator", "", "classCacheResolver", "custom");
  }
View Full Code Here

TOP

Related Classes of org.springframework.cache.interceptor.CacheOperation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.