Test toMap() on an empty region

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@14125 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Brian Stansberry 2007-10-19 21:06:44 +00:00
parent 7ec8086743
commit 9264a31362
1 changed files with 5 additions and 1 deletions

View File

@ -116,10 +116,14 @@ public abstract class AbstractRegionImplTestCase extends AbstractJBossCacheTestC
Region region = createRegion(regionFactory, "test/test", cfg.getProperties(), getCacheDataDescription());
Map map = region.toMap();
assertNotNull(map);
assertEquals(0, map.size());
putInRegion(region, "key1", "value1");
putInRegion(region, "key2", "value2");
Map map = region.toMap();
map = region.toMap();
assertNotNull(map);
assertEquals(2, map.size());
assertEquals("value1", map.get("key1"));