From 9264a3136239fad7a7e4ac9de771764ab1173abf Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Fri, 19 Oct 2007 21:06:44 +0000 Subject: [PATCH] Test toMap() on an empty region git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@14125 1b8cb986-b30d-0410-93ca-fae66ebed9b2 --- .../test/cache/jbc2/AbstractRegionImplTestCase.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/AbstractRegionImplTestCase.java b/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/AbstractRegionImplTestCase.java index f0fcf79193..9ad0cb069d 100644 --- a/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/AbstractRegionImplTestCase.java +++ b/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/AbstractRegionImplTestCase.java @@ -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"));