From a53987ace14e0b3d7c50b0ea7f4822393f8da5be Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Wed, 16 Jul 2014 20:27:49 +0200 Subject: [PATCH] Renamed JCacheEhCacheTest to JCacheEhCacheTests --- ...CacheTest.java => JCacheEhCacheTests.java} | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) rename spring-context-support/src/test/java/org/springframework/cache/jcache/{JCacheEhCacheTest.java => JCacheEhCacheTests.java} (83%) diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheTest.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheTests.java similarity index 83% rename from spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheTest.java rename to spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheTests.java index 31f121a825..e915779dc9 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheTest.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheTests.java @@ -40,13 +40,13 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** - * * @author Stephane Nicoll */ -public class JCacheEhCacheTest extends AbstractAnnotationTests { +public class JCacheEhCacheTests extends AbstractAnnotationTests { private CacheManager jCacheManager; + @Override protected ConfigurableApplicationContext getApplicationContext() { ConfigurableApplicationContext context = new AnnotationConfigApplicationContext(EnableCachingConfig.class); @@ -59,12 +59,14 @@ public class JCacheEhCacheTest extends AbstractAnnotationTests { jCacheManager.close(); } + @Override @Test @Ignore("Multi cache manager support to be added") public void testCustomCacheManager() { } + @Configuration @EnableCaching static class EnableCachingConfig extends CachingConfigurerSupport { @@ -78,16 +80,11 @@ public class JCacheEhCacheTest extends AbstractAnnotationTests { @Bean public CacheManager jCacheManager() { CacheManager cacheManager = Caching.getCachingProvider().getCacheManager(); - final MutableConfiguration mutableConfiguration - = new MutableConfiguration(); - mutableConfiguration.setStoreByValue(false); // Otherwise value has to be Serializable - cacheManager.createCache("testCache", - new JCacheConfiguration(mutableConfiguration)); - cacheManager.createCache("primary", - new JCacheConfiguration(mutableConfiguration)); - cacheManager.createCache("secondary", - new JCacheConfiguration(mutableConfiguration)); - + MutableConfiguration mutableConfiguration = new MutableConfiguration(); + mutableConfiguration.setStoreByValue(false); // otherwise value has to be Serializable + cacheManager.createCache("testCache", new JCacheConfiguration(mutableConfiguration)); + cacheManager.createCache("primary", new JCacheConfiguration(mutableConfiguration)); + cacheManager.createCache("secondary", new JCacheConfiguration(mutableConfiguration)); return cacheManager; } @@ -111,6 +108,6 @@ public class JCacheEhCacheTest extends AbstractAnnotationTests { public KeyGenerator customKeyGenerator() { return new SomeCustomKeyGenerator(); } - } -} \ No newline at end of file + +}