[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/api ...

Ben Wang bwang at jboss.com
Mon Oct 9 04:14:05 EDT 2006


  User: bwang   
  Date: 06/10/09 04:14:05

  Modified:    tests/functional/org/jboss/cache/api  CacheAPITest.java
  Log:
  Updated with new getRegion api
  
  Revision  Changes    Path
  1.2       +17 -4     JBossCache/tests/functional/org/jboss/cache/api/CacheAPITest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheAPITest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/api/CacheAPITest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- CacheAPITest.java	13 Sep 2006 15:53:05 -0000	1.1
  +++ CacheAPITest.java	9 Oct 2006 08:14:05 -0000	1.2
  @@ -272,13 +272,26 @@
       */
      public void testRegion()
      {
  -      Region rootRegion = cache.getRegion(Fqn.ROOT);
  +      Region rootRegion = cache.getRegion(Fqn.ROOT, true);
         assertNotNull(rootRegion);  // guaranteed never to return null.  cache.getRegion() will create a new region if necessary.
  -      assertSame(rootRegion, cache.getRegion(Fqn.ROOT));
  +      assertSame(rootRegion, cache.getRegion(Fqn.ROOT, true));
   
  -      Region otherRegion = cache.getRegion(Fqn.fromString("/other/region"));
  +      Region otherRegion = cache.getRegion(Fqn.fromString("/other/region"), true);
         assertNotNull(otherRegion);
  -      assertSame(otherRegion, cache.getRegion(Fqn.fromString("/other/region")));
  +      assertSame(otherRegion, cache.getRegion(Fqn.fromString("/other/region"), true));
  +   }
  +
  +   /**
  +    * Again, see org.jboss.cache for more extensive tests on Regions.  This just tests the getRegion API on cache.
  +    */
  +   public void testNullRegion()
  +   {
  +      Region rootRegion = cache.getRegion(Fqn.ROOT, true);
  +      assertNotNull(rootRegion);  // guaranteed never to return null.  cache.getRegion() will create a new region if necessary.
  +      assertSame(rootRegion, cache.getRegion(Fqn.ROOT, false));
  +
  +      Region otherRegion = cache.getRegion(Fqn.fromString("/other/region"), false);
  +      assertNull(otherRegion);
      }
   
   }
  
  
  



More information about the jboss-cvs-commits mailing list