DATAREDIS-78

This commit is contained in:
Costin Leau
2011-10-25 11:54:08 +03:00
parent 91e4694a02
commit 9c5d01e9a2
2 changed files with 11 additions and 1 deletions

View File

@@ -16,6 +16,7 @@
package org.springframework.data.redis.cache;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
@@ -29,6 +30,7 @@ import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
import org.springframework.data.redis.ConnectionFactoryTracker;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.support.collections.CollectionTestParams;
@@ -123,4 +125,13 @@ public class RedisCacheTest extends AbstractNativeCacheTest<RedisTemplate> {
assertNull(cache.get(key2));
assertEquals(key1, cache.get(value1).get());
}
@Test
public void testCacheName() throws Exception {
CacheManager redisCM = new RedisCacheManager(template);
String cacheName = "s2gx11";
Cache cache = redisCM.getCache(cacheName);
assertNotNull(cache);
assertTrue(redisCM.getCacheNames().contains(cacheName));
}
}