1 package net.sf.ehcache.hibernate.management.impl;
2
3 import static org.hamcrest.CoreMatchers.is;
4 import static org.junit.Assert.assertThat;
5
6 import net.sf.ehcache.CacheManager;
7
8 import org.junit.BeforeClass;
9 import org.junit.Test;
10
11 /***
12 * @author Alex Snaps
13 */
14 public class EhcacheStatsImplTest {
15
16 private static EhcacheStatsImpl stats;
17
18 @BeforeClass
19 public static void createCache() throws Exception {
20 CacheManager manager = CacheManager.getInstance();
21 stats = new EhcacheStatsImpl(manager);
22 }
23
24 @Test
25 public void testIsRegionCacheOrphanEvictionEnabled() {
26 assertThat(stats.isRegionCacheOrphanEvictionEnabled("sampleCache1"), is(false));
27 }
28
29 @Test
30 public void testGetRegionCacheOrphanEvictionPeriod() {
31 assertThat(stats.getRegionCacheOrphanEvictionPeriod("sampleCache1"), is(-1));
32 }
33 }